From 43e8f7d86b46044d0f5e9726f95ab58babf48af6 Mon Sep 17 00:00:00 2001 From: davidcok Date: Wed, 8 Nov 2023 10:16:46 -0500 Subject: [PATCH 01/18] Attempts at JavaFX issue --- tools/rack/pom.xml | 5 + tools/rack/rack.plugin/META-INF/MANIFEST.MF | 3 +- tools/rack/rack.plugin/plugin.xml | 3 +- .../com/ge/research/rack/ClearAllHandler.java | 4 +- .../com/ge/research/rack/HandlerUtils.java | 2 +- .../ge/research/rack/RegenerateManifest.java | 5 +- .../rack/autoGsn/utils/CustomStringUtils.java | 2 +- .../autoGsn/utils/OntologyJsonObjUtils.java | 2 +- .../AutoGsnUnifiedDrillGoalViewHandler.java | 8 +- .../AutoGsnUnifiedMainViewHandler.java | 9 +- .../viewHandlers/GsnTreeViewHandler.java | 55 +++--- .../boeingPsac/PsacDataProcessorBoeing.java | 4 +- .../rack/report/utils/RackQueryUtils.java | 2 +- .../rack/report/utils/ReportViewUtils.java | 6 +- .../ReportMainViewHandlerNew.java | 18 +- .../ReportObjectiveViewHandlerNew.java | 20 +- .../ReportTableViewHandlerNew.java | 6 +- .../com/ge/research/rack/utils/OwlUtil.java | 171 +++++++++-------- .../ge/research/rack/utils/ProjectUtils.java | 8 +- .../ge/research/rack/utils/RackConsole.java | 2 - .../RackManifestIngestionBuilderUtil.java | 2 +- .../rack/views/AssuranceCaseTree.java | 129 +++++++++++-- .../rack/views/IngestionNodegroups.java | 50 ++--- .../rack/views/NodegroupActionFactory.java | 2 +- .../rack/views/NodegroupColumnView.java | 179 +++++++++--------- .../rack/views/NodegroupTemplateView.java | 173 ++++++++--------- .../research/rack/views/OntologyTreeView.java | 4 +- .../research/rack/views/OtherNodegroups.java | 50 ++--- .../com/ge/research/rack/views/RibView.java | 2 +- .../rack/views/SelectDataGraphsDialog.java | 10 +- 30 files changed, 520 insertions(+), 416 deletions(-) diff --git a/tools/rack/pom.xml b/tools/rack/pom.xml index 8d84963e..6b450a4e 100644 --- a/tools/rack/pom.xml +++ b/tools/rack/pom.xml @@ -218,6 +218,11 @@ ${version.javafx} win + + org.openjfx + javafx-swing + 19 + org.openjfx javafx-web diff --git a/tools/rack/rack.plugin/META-INF/MANIFEST.MF b/tools/rack/rack.plugin/META-INF/MANIFEST.MF index 7353efb1..5e12a952 100644 --- a/tools/rack/rack.plugin/META-INF/MANIFEST.MF +++ b/tools/rack/rack.plugin/META-INF/MANIFEST.MF @@ -42,7 +42,8 @@ Require-Bundle: com.ge.research.jena, org.eclipse.ui.forms, org.slf4j.api, org.yaml.snakeyaml, - org.eclipse.debug.ui + org.eclipse.debug.ui, + openjfx.swing;bundle-version="17.0.2" Bundle-ClassPath: ., lib/connectionUtils.jar, lib/graphviz-java.jar, diff --git a/tools/rack/rack.plugin/plugin.xml b/tools/rack/rack.plugin/plugin.xml index 88093686..ff931fb4 100644 --- a/tools/rack/rack.plugin/plugin.xml +++ b/tools/rack/rack.plugin/plugin.xml @@ -440,8 +440,7 @@ - diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/ClearAllHandler.java b/tools/rack/rack.plugin/src/com/ge/research/rack/ClearAllHandler.java index 984f0d75..29e63dbf 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/ClearAllHandler.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/ClearAllHandler.java @@ -105,9 +105,7 @@ public static void deleteAllNodegroups(IProgressMonitor monitor) throws Exceptio @Override public Object execute(ExecutionEvent event) throws ExecutionException { - - ClearRackDialog dialog = - new ClearRackDialog(Display.getDefault().getActiveShell()); + ClearRackDialog dialog = new ClearRackDialog(Display.getDefault().getActiveShell()); dialog.run(); return null; diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/HandlerUtils.java b/tools/rack/rack.plugin/src/com/ge/research/rack/HandlerUtils.java index de15f89b..3a5f9b08 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/HandlerUtils.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/HandlerUtils.java @@ -163,7 +163,7 @@ public static List getCurrentSelection(ExecutionEvent event) { return paths; } - + public static IProject getCurrentIProject(ExecutionEvent event) { ISelection selection = HandlerUtil.getCurrentSelection(event); diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/RegenerateManifest.java b/tools/rack/rack.plugin/src/com/ge/research/rack/RegenerateManifest.java index e121a36b..2471f8da 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/RegenerateManifest.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/RegenerateManifest.java @@ -31,6 +31,8 @@ */ package com.ge.research.rack; +import com.ge.research.rack.utils.RackConsole; + import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -40,15 +42,12 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceProxy; import org.eclipse.core.resources.IResourceProxyVisitor; -import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.DumperOptions.FlowStyle; import org.yaml.snakeyaml.Yaml; -import com.ge.research.rack.utils.RackConsole; - import java.io.ByteArrayInputStream; import java.io.CharArrayWriter; import java.io.InputStream; diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/utils/CustomStringUtils.java b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/utils/CustomStringUtils.java index 57b5861d..f86a1d1c 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/utils/CustomStringUtils.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/utils/CustomStringUtils.java @@ -58,7 +58,7 @@ public class CustomStringUtils { * @return */ public static String getGsnOutDir(String instanceFilePath) { - //String dirPath = ""; + // String dirPath = ""; // get the instance folder path String instDir = CustomFileUtils.getFileDirectory(instanceFilePath); diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/utils/OntologyJsonObjUtils.java b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/utils/OntologyJsonObjUtils.java index eb415295..108d737d 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/utils/OntologyJsonObjUtils.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/utils/OntologyJsonObjUtils.java @@ -87,7 +87,7 @@ public static List getPropertyRangeURIs( String rowRangeInfo = classPropertyRange.get(2).toString(); String rowClassId = rowClassInfo.split("\\:")[1]; - //String rowClassUri = + // String rowClassUri = // getUriPrefix(ontInfo, rowClassInfo.split("\\:")[0]) + "#" + rowClassId; String rowPropId = rowPropInfo.split("\\:")[1]; String rowPropUri = diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/AutoGsnUnifiedDrillGoalViewHandler.java b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/AutoGsnUnifiedDrillGoalViewHandler.java index 561de596..43d9bfd9 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/AutoGsnUnifiedDrillGoalViewHandler.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/AutoGsnUnifiedDrillGoalViewHandler.java @@ -76,7 +76,7 @@ public class AutoGsnUnifiedDrillGoalViewHandler { // -------- Local variables to store data // All relevant GSN for this traverse instance - //private List allRelevantGsn; + // private List allRelevantGsn; // Current level private int currentGoalLevel = 0; @@ -283,10 +283,10 @@ private void populateStatusChart(int numPassed, int numFailed) { // populate the status chart - XYChart.Series dataSeries1 = new XYChart.Series<>(); + XYChart.Series dataSeries1 = new XYChart.Series<>(); - Data passBar = new XYChart.Data<>("Passed", numPassed); - Data failBar = new XYChart.Data<>("Failed", numFailed); + Data passBar = new XYChart.Data<>("Passed", numPassed); + Data failBar = new XYChart.Data<>("Failed", numFailed); dataSeries1.getData().add(passBar); dataSeries1.getData().add(failBar); diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/AutoGsnUnifiedMainViewHandler.java b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/AutoGsnUnifiedMainViewHandler.java index 5781bf3b..260e7885 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/AutoGsnUnifiedMainViewHandler.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/AutoGsnUnifiedMainViewHandler.java @@ -98,7 +98,7 @@ public class AutoGsnUnifiedMainViewHandler { @FXML private GridPane gridPaneCharts; // @FXML private BarChart chartBarStatus; - @FXML private BarChart chartBarClass; + @FXML private BarChart chartBarClass; // -------------------------------- @@ -192,11 +192,11 @@ private void populateCharts() { // populate the class bar chart - XYChart.Series classData = new XYChart.Series<>(); + XYChart.Series classData = new XYChart.Series<>(); // Create a list to store the Data objects so that we can // color them later - List> classBarList = new ArrayList<>(); + List> classBarList = new ArrayList<>(); // By this step, all classes will have been added // to the comboClassFilter @@ -206,7 +206,8 @@ private void populateCharts() { if (!classKey.equalsIgnoreCase("All")) { int classCount = AutoGsnGuiUtils.getClassCount(AutoGsnViewsManager.allRootGoals, classKey); - Data classBar = new XYChart.Data(classKey, classCount); + Data classBar = + new XYChart.Data(classKey, classCount); classData.getData().add(classBar); classBarList.add(classBar); } diff --git a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/GsnTreeViewHandler.java b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/GsnTreeViewHandler.java index c139845e..2c1d5bca 100644 --- a/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/GsnTreeViewHandler.java +++ b/tools/rack/rack.plugin/src/com/ge/research/rack/autoGsn/viewHandlers/GsnTreeViewHandler.java @@ -88,31 +88,33 @@ private Label getNodeTreeLabel(GsnNode node) { return nodeLabel; } -// /** -// * For a given GSN node, creates a treeitem and recursively creates treeitems for all supporting -// * nodes -// * -// * @param node -// * @return -// */ -// private TreeItem