]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
refs #5091
authorjsimomaa <jsimomaa@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 11 Jul 2014 10:50:20 +0000 (10:50 +0000)
committerjsimomaa <jsimomaa@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 11 Jul 2014 10:50:20 +0000 (10:50 +0000)
Change subclasses that extend LabelPropertyTabContributor to call superclasses constructor

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29863 ac1ea38d-2e2b-0410-8846-a27921b304fc

31 files changed:
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayDependencyTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayFlowTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayIndexesTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/CommentTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ConfigurationTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/DependencyTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EnumerationTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/EquationTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ExperimentTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ExternalFilesTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/FlowTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/FunctionLibraryTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/FunctionTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/GameExperimentTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/HistoryDataTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/InputVariableTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/LookupTableTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/LoopTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleInputTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleOutputTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleParameterTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleTypeTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/PlaybackExperimentTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ReferenceDependencyTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResultTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/SensitivityAnalysisExperimentTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/SharedFunctionLibrariesTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/VariableInformationTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/SensitivityChartAxisAndVariablesTab.java

index bd1c1bfd910f63936894de89f1c89a5a5add6c85..1e7808846c7567f00acdbc916196c123e27a3b86 100644 (file)
@@ -268,7 +268,11 @@ public class ArrayDependencyTab  extends AdjustableTab {
         }\r
     }\r
 \r
-       @Override\r
+       public ArrayDependencyTab(Object dependencies) {\r
+           super(dependencies);\r
+       }\r
+\r
+    @Override\r
        protected void createAndAddControls(Composite body, IWorkbenchSite site,\r
                        ISessionContext context, WidgetSupport support) {\r
                composite = new Composite(body, SWT.NONE);\r
@@ -387,5 +391,4 @@ public class ArrayDependencyTab  extends AdjustableTab {
         GridDataFactory.fillDefaults().span(1, 1).applyTo(lineThicknessGroup);\r
         GridLayoutFactory.fillDefaults().applyTo(lineThicknessGroup);\r
        }\r
-\r
 }\r
index ad02e9ada9b3d66a38b70f4aba0f22838eef8e55..47238fb4d5602b7b8d2c3fa1456f24c4491cf635 100644 (file)
@@ -42,6 +42,10 @@ public class ArrayFlowTab  extends LabelPropertyTabContributor {
 \r
        private Scale lineThicknessScale;\r
     \r
+    public ArrayFlowTab(Object input) {\r
+        super(input);\r
+    }\r
+\r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
         Composite composite = new Composite(body, SWT.NONE);\r
@@ -102,5 +106,4 @@ public class ArrayFlowTab  extends LabelPropertyTabContributor {
             return (int)Math.round(FlowConnectionStyle.DEFAULT_LINE_WIDTH * 3);\r
         }\r
     }\r
-\r
 }\r
index e97de85e745d48ba8d08cd6985d5289478897208..cd1f9971cb5192be98e9a2460a08ac100a11d1d8 100644 (file)
@@ -51,7 +51,12 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg
        private WidgetSupportImpl buttonSupport;\r
        private org.simantics.browsing.ui.swt.widgets.Label usedEnumerationsLabel;\r
        \r
-       @Override\r
+       public ArrayIndexesTab(Object variables) {\r
+        super(variables);\r
+    }\r
+\r
+\r
+    @Override\r
        public void createControls(Composite body, IWorkbenchSite site,\r
                        ISessionContext context, WidgetSupport support) {\r
                support.register(this);\r
@@ -406,5 +411,4 @@ public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widg
         \r
 \r
        }\r
-\r
 }\r
index 0b6c00c10031eed1bb4fa0a49f88d3e0c3bacaea..cc4838c7291d45e65066b475a476eab566e43e76 100644 (file)
@@ -34,7 +34,11 @@ import org.simantics.jfreechart.chart.properties.LabelPropertyTabContributor;
  */\r
 public class CommentTab extends LabelPropertyTabContributor {\r
 \r
-       @Override\r
+       public CommentTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    @Override\r
        public String getPartName(ISelection forSelection) {\r
                return "Comment";\r
        }\r
index 33ad0ea6310db36e136a65d172974a9b67275bfb..31ad9e7a398875b5f9024c016bfad4c79886a7b1 100644 (file)
@@ -59,7 +59,11 @@ import org.simantics.sysdyn.ui.properties.widgets.factories.ModelNameInputValida
  */\r
 public class ConfigurationTab extends AdjustableTab {\r
 \r
-       private ScrolledComposite sc;\r
+       public ConfigurationTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    private ScrolledComposite sc;\r
        private Label nameLabel, startTimeLabel, stopTimeLabel, stepLengthLabel, \r
                outputIntervalLabel, methodLabel, toleranceLabel, variableFilterLabel;\r
        private TrackedText name, startTime, stopTime, stepLength, outputInterval, tolerance, variableFilter;\r
index 1acc02126ddd35cfa09d5c89f74f663c267d0c4a..194c0df12332d2d2f93fefc8b22f02b7606e7b35 100644 (file)
@@ -50,6 +50,10 @@ import org.simantics.utils.datastructures.Triple;
  */\r
 public class DependencyTab  extends AdjustableTab {\r
 \r
+    public DependencyTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     Button none, plus, minus, other, inside, outside;\r
     TrackedText polarityText, polarityLocationText;\r
     Scale lineThicknessScale;\r
index 833a62610a814884d0dd739c622436615afdc374..7514f47c6184dc6e4b8d9366667db965c77b169d 100644 (file)
@@ -60,15 +60,19 @@ import org.simantics.sysdyn.manager.SysdynModel;
 import org.simantics.sysdyn.manager.SysdynModelManager;\r
 import org.simantics.sysdyn.ui.properties.widgets.arrays.EnumerationIndexNode;\r
 import org.simantics.sysdyn.ui.properties.widgets.arrays.ReplaceableIndexesWidget;\r
-import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNamePropertyModifier;\r
 import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNameInputValidator;\r
+import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNamePropertyModifier;\r
 import org.simantics.ui.SimanticsUI;\r
 import org.simantics.utils.datastructures.ArrayMap;\r
 import org.simantics.utils.ui.AdaptionUtils;\r
 \r
 public class EnumerationTab extends LabelPropertyTabContributor implements Widget {\r
 \r
-       GraphExplorerComposite indexExplorer;\r
+       public EnumerationTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    GraphExplorerComposite indexExplorer;\r
        \r
        Button showAll;\r
        Variable variable;\r
index 633cdfa3df877678dd47127b35af3b4ebf285bdf..429014df04e1bf08bb075063a520d4fc3fe2f617 100644 (file)
@@ -104,7 +104,11 @@ public class EquationTab extends AdjustableTab implements Widget {
        private Label unitLabel;\r
        private IsOutputWidget isOutput;\r
 \r
-       @Override\r
+       public EquationTab(Object input) {\r
+           super(input);\r
+    }\r
+\r
+    @Override\r
        public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport _support) {\r
                _support.register(this);\r
                setSupport();\r
index 0c291db7a828d0720b22c9ceae117cc5ec699f16..d1bb32f5cb848ba8a1bd47e285a163c434e649d8 100644 (file)
@@ -19,6 +19,10 @@ import org.simantics.jfreechart.chart.properties.LabelPropertyTabContributor;
 \r
 public class ExperimentTab extends LabelPropertyTabContributor {\r
 \r
+    public ExperimentTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
         \r
index a4a91c9f02f29639b955484568f283e5c7661f25..f2a98f76167ad4b727b629e394aa989a7fca7a2b 100644 (file)
@@ -55,7 +55,11 @@ import org.simantics.utils.datastructures.Pair;
  */\r
 public class ExternalFilesTab extends LabelPropertyTabContributor implements Widget {\r
 \r
-       GraphExplorerComposite externalFilesExplorer;\r
+       public ExternalFilesTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    GraphExplorerComposite externalFilesExplorer;\r
        Button importButton, exportButton, removeButton; \r
        \r
        @Override\r
index 885d4ab9acba53fd4be90a538e3e922254372aeb..1eee34ca7c963d1c28c27a49fb1279393712c21b 100644 (file)
@@ -33,6 +33,10 @@ import org.simantics.sysdyn.ui.elements.connections.FlowConnectionStyle;
 \r
 public class FlowTab  extends LabelPropertyTabContributor {\r
 \r
+    public FlowTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     Scale lineThicknessScale;\r
     \r
     @Override\r
index 9704d07480cbdca5ade31ec5865eb13b37033fbc..567d57bb30edc4b7330574ae58be3bed7948e661 100644 (file)
@@ -27,7 +27,11 @@ import org.simantics.sysdyn.ui.properties.widgets.factories.FunctionLibraryNameI
 \r
 public class FunctionLibraryTab extends LabelPropertyTabContributor {\r
 \r
-       @Override\r
+       public FunctionLibraryTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    @Override\r
        public void createControls(Composite body, IWorkbenchSite site,\r
                        ISessionContext context, WidgetSupport support) {\r
                Composite composite = new Composite(body, SWT.NONE);\r
index c20ede211a543439d3f5ec07e20ebe3d9a189c2d..e50e110adcababd7ba8c42845a28b5ba92b6902f 100644 (file)
@@ -32,7 +32,11 @@ import org.simantics.sysdyn.ui.properties.widgets.functions.FunctionCodeWidget;
 \r
 public class FunctionTab extends AdjustableTab {\r
        \r
-       ExpressionField modelicaCode;\r
+       public FunctionTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    ExpressionField modelicaCode;\r
        private TrackedText nameText;\r
        private Group modelicaGroup;\r
        private Label startLabel;\r
index 8e26cc3fd28aee2b56263f536cac5a7e1e2fe66a..ea4941fefba7f6b3b4cb25dff57942fd4ae44282 100644 (file)
@@ -29,7 +29,11 @@ import org.simantics.utils.ui.validators.DoubleValidator;
  */\r
 public class GameExperimentTab extends LabelPropertyTabContributor {\r
 \r
-       @Override\r
+       public GameExperimentTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    @Override\r
        public void createControls(Composite body, IWorkbenchSite site,\r
                ISessionContext context, WidgetSupport support) {\r
                \r
index ceed5ad2b8d3614dfd9c789e90e0d00db77abe87..2b4883eaa9dbd7fddd047d2d20bd4113d6d039e8 100644 (file)
@@ -63,6 +63,10 @@ import org.simantics.utils.ui.ISelectionUtils;
  */\r
 public class HistoryDataTab  extends LabelPropertyTabContributor {\r
 \r
+    public HistoryDataTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
         \r
index fd5480ee1a85067ae3217526ca70aed6f13211a1..5da056d0197e1cbcd8f63659bfd37c349a8f0b57 100644 (file)
@@ -41,8 +41,8 @@ import org.simantics.sysdyn.ui.properties.widgets.IsOutputWidget;
 import org.simantics.sysdyn.ui.properties.widgets.UnitComboWidget;\r
 import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyFactory;\r
 import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyModifier;\r
-import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNamePropertyModifier;\r
 import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNameInputValidator;\r
+import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNamePropertyModifier;\r
 import org.simantics.utils.datastructures.Pair;\r
 import org.simantics.utils.ui.validators.DoubleValidator;\r
 \r
@@ -55,6 +55,10 @@ import org.simantics.utils.ui.validators.DoubleValidator;
 public class InputVariableTab  extends LabelPropertyTabContributor {\r
 \r
     \r
+    public InputVariableTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
         Composite composite = new Composite(body, SWT.NONE);\r
index 25de7c92510661e9319fd70ecde046426acc52fb..ec059e69ede6e62c92229268dd4519b146cfa686 100644 (file)
@@ -28,7 +28,11 @@ import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyFactor
 import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyModifier;\r
 \r
 public class LookupTableTab extends LabelPropertyTabContributor {\r
-    \r
+\r
+    public LookupTableTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
 \r
index ee43cbb41ce1bf911988fb94fd8236a95be24a9a..ffec528decaa477402c6786ffc26e13b374b13c0 100644 (file)
@@ -56,7 +56,11 @@ import org.simantics.utils.datastructures.Triple;
  */\r
 public class LoopTab extends AdjustableTab {\r
 \r
-       private Label loopItemsLabel;\r
+       public LoopTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    private Label loopItemsLabel;\r
        private TrackedCombo loopItemsDropdown;\r
        Button auto, balancing, reinforcing, other, inside, outside;\r
     TrackedText loopComment, polarityLocationText;\r
@@ -64,8 +68,8 @@ public class LoopTab extends AdjustableTab {
     Group commentGroup, rotationGroup;\r
        protected Resource resource;\r
        public static final String AUTO = "$$AUTO$$";\r
-       \r
-       @Override\r
+\r
+    @Override\r
        protected void createAndAddControls(Composite body, IWorkbenchSite site,\r
                        ISessionContext context, WidgetSupport support) {\r
                composite = new Composite(body, SWT.NONE);\r
@@ -402,5 +406,4 @@ public class LoopTab extends AdjustableTab {
             return true;\r
         }\r
     }\r
-\r
 }\r
index 320fb9075610b76598d337930e24734e2a2555b5..0455d0e35207885f9474850c5f70b73d24d651b8 100644 (file)
@@ -36,6 +36,10 @@ import org.simantics.sysdyn.ui.properties.widgets.modules.RowProvider;
 \r
 public class ModuleInputTab extends LabelPropertyTabContributor {\r
 \r
+    public ModuleInputTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     public static final String FIRSTCOLUMN = "Input in Module";\r
     public static final String SECONDCOLUMN = "Refers to output";\r
     \r
index 9691f7e7c6c49cf8418eee27a980d555efa031cb..d35bc40675dfa073f0b9abc705ce1ba322484a64 100644 (file)
@@ -36,6 +36,10 @@ import org.simantics.sysdyn.ui.properties.widgets.modules.RowProvider;
 \r
 public class ModuleOutputTab extends LabelPropertyTabContributor {\r
 \r
+    public ModuleOutputTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     public static final String FIRSTCOLUMN = "Output in module";\r
     public static final String SECONDCOLUMN = "Referes to input";\r
     \r
index 5e3f1246c656f6d88fd10289c510dcbf0ac2237a..e80cf2059479bec174a04df21f9bd5473da1f673 100644 (file)
@@ -30,6 +30,10 @@ import org.simantics.utils.datastructures.ArrayMap;
 \r
 public class ModuleParameterTab extends LabelPropertyTabContributor {\r
 \r
+    public ModuleParameterTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     GraphExplorerComposite explorer;\r
     \r
     @Override\r
index 64a558bf07e2b83408d77a3c091c9f0be48db390..0a6ed5360766868e025ce7a6557d0ef933b9614a 100644 (file)
@@ -37,7 +37,12 @@ import org.simantics.utils.datastructures.ArrayMap;
 \r
 public class ModuleTab extends LabelPropertyTabContributor implements Widget {\r
 \r
-       GraphExplorerComposite enumerationRedeclarationExplorer;\r
+       public ModuleTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+\r
+    GraphExplorerComposite enumerationRedeclarationExplorer;\r
        \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
index 918dafd21d33749134b27bec6018e17eb11c0077..69976cc3362a32ea9cf174c2dcf3335d087a4a8a 100644 (file)
@@ -27,6 +27,10 @@ import org.simantics.sysdyn.ui.properties.widgets.factories.ModuleTypeNameInputV
 \r
 public class ModuleTypeTab extends LabelPropertyTabContributor {\r
 \r
+    public ModuleTypeTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
         Composite composite = new Composite(body, SWT.NONE);\r
index a1038bc5050275f6e9329736f4bdb96ec74f9a32..0c595db958a88e6f034b9f1f8b6967825658891b 100644 (file)
@@ -43,6 +43,10 @@ import org.simantics.utils.ui.color.ColorValue;
 \r
 public class PlaybackExperimentTab extends LabelPropertyTabContributor {\r
 \r
+    public PlaybackExperimentTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     private static int gradientWidth = 250;\r
     private static int gradientHeight = 20;\r
 \r
index 55c4ce956db5632e86670bc04946af75cd70f686..369a8da42be1f2d91b73048201930de15f958297 100644 (file)
@@ -19,6 +19,10 @@ import org.simantics.jfreechart.chart.properties.LabelPropertyTabContributor;
 \r
 public class ReferenceDependencyTab extends LabelPropertyTabContributor {\r
 \r
+    public ReferenceDependencyTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
     }\r
index 49407d6bbd459f0590427f117e4d0207f17a8632..11ef3069e7faf981908ec6cd5b6a3ee76f721db4 100644 (file)
@@ -114,14 +114,14 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                 if (!variables.isEmpty())\r
                        // Do we have at least one variable\r
                        tabs.add(new ComparableTabContributor(\r
-                               new ArrayIndexesTab(),\r
+                               new ArrayIndexesTab(variables),\r
                                1,\r
                                variables,\r
                                "Indexes"));\r
                 else if (!dependencies.isEmpty()) {\r
                     // Dependencies only\r
                        tabs.add(new ComparableTabContributor(\r
-                            new ArrayDependencyTab(),\r
+                            new ArrayDependencyTab(dependencies),\r
                             1,\r
                             dependencies,\r
                             "Dependency Properties"));\r
@@ -129,7 +129,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                 else if (!flows.isEmpty()) {\r
                     // Flows only\r
                        tabs.add(new ComparableTabContributor(\r
-                            new ArrayFlowTab(),\r
+                            new ArrayFlowTab(flows),\r
                             1,\r
                             flows,\r
                             "Flow Properties"));\r
@@ -165,7 +165,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                 SharedFunctionsFolder sff = AdaptionUtils.adaptToSingle(selection, SharedFunctionsFolder.class);\r
                 if (sff != null) {\r
                     return Collections.singleton(new ComparableTabContributor(\r
-                            new SharedFunctionLibrariesTab(),\r
+                            new SharedFunctionLibrariesTab(sff.data),\r
                             2,\r
                             sff.data,\r
                             "Shared Functions"));\r
@@ -179,7 +179,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                 NodeType type = nc.getConstant(NodeType.TYPE);\r
                 if(type != null && type.equals(sharedFunctionsTestNode)) {\r
                     return Collections.singleton(new ComparableTabContributor(\r
-                            new SharedFunctionLibrariesTab(),\r
+                            new SharedFunctionLibrariesTab(r),\r
                             2,\r
                             r,\r
                             "Shared Functions"));\r
@@ -225,7 +225,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if(backend.isInstanceOf(r, sr.Loop)) {\r
                return Collections.singleton(\r
                                (new ComparableTabContributor(\r
-                               new LoopTab(),\r
+                               new LoopTab(r),\r
                                1,\r
                                r,\r
                                "Loop")));\r
@@ -249,27 +249,27 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                     expression = expressionList.get(0);\r
                 }\r
                 tabs.add(new ComparableTabContributor(\r
-                        new EquationTab(),\r
+                        new EquationTab(var != null ? var : r),\r
                         3,\r
                         var != null ? var : r,\r
                         "Equation"));\r
                 if(expression != null && backend.isInstanceOf(expression, sr.WithLookupExpression)) {\r
                     // WithLookupExpression has its own extra tab for visual configuration\r
                     tabs.add(new ComparableTabContributor(\r
-                            new LookupTableTab(),\r
+                            new LookupTableTab(expression),\r
                             2,\r
                             expression,\r
                             "Lookup Table"));\r
                 }\r
 \r
                 tabs.add(new ComparableTabContributor(\r
-                        new ArrayIndexesTab(),\r
+                        new ArrayIndexesTab(r),\r
                         1,\r
                         r,\r
                         "Indexes"));\r
 \r
                 tabs.add(new ComparableTabContributor(\r
-                        new VariableInformationTab(),\r
+                        new VariableInformationTab(r),\r
                         0,\r
                         r,\r
                         "Additional Information"));\r
@@ -279,19 +279,19 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             // Input variable\r
             if (backend.isInstanceOf(r, sr.Input)) {\r
                 tabs.add(new ComparableTabContributor(\r
-                        new InputVariableTab(),\r
+                        new InputVariableTab(r),\r
                         2,\r
                         r,\r
                         "Input"));\r
 \r
                 tabs.add(new ComparableTabContributor(\r
-                        new ArrayIndexesTab(),\r
+                        new ArrayIndexesTab(r),\r
                         1,\r
                         r,\r
                         "Indexes"));\r
 \r
                 tabs.add(new ComparableTabContributor(\r
-                        new VariableInformationTab(),\r
+                        new VariableInformationTab(r),\r
                         0,\r
                         r,\r
                         "Additional Information"));\r
@@ -305,7 +305,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                     s = r;\r
                 // give either variable or the actual resource\r
                 return Collections.singleton(new ComparableTabContributor(\r
-                        new EnumerationTab(),\r
+                        new EnumerationTab(s),\r
                         2,\r
                         s,\r
                         "Enumeration"));\r
@@ -318,7 +318,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                 if (r != null)\r
                     return Collections.singleton(\r
                             new ComparableTabContributor(\r
-                                    new ConfigurationTab(),\r
+                                    new ConfigurationTab(r),\r
                                     0,\r
                                     r,\r
                                     "Model Properties"));\r
@@ -327,22 +327,22 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             // Module\r
             if (backend.isInstanceOf(r, sr.Module)){\r
                 tabs.add(new ComparableTabContributor(\r
-                        new ModuleTab(),\r
+                        new ModuleTab(r),\r
                         10,\r
                         r,\r
                         "Module Properties"));\r
                 tabs.add(new ComparableTabContributor(\r
-                        new ModuleParameterTab(),\r
+                        new ModuleParameterTab(r),\r
                         9,\r
                         r,\r
                         "Parameters"));\r
                 tabs.add(new ComparableTabContributor(\r
-                        new ModuleInputTab(),\r
+                        new ModuleInputTab(r),\r
                         2,\r
                         r,\r
                         "Inputs"));\r
                 tabs.add(new ComparableTabContributor(\r
-                        new ModuleOutputTab(),\r
+                        new ModuleOutputTab(r),\r
                         1,\r
                         r,\r
                         "Outputs"));\r
@@ -353,7 +353,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if (backend.isInstanceOf(r, sr.PlaybackExperiment))\r
                 return Collections.singleton(\r
                         new ComparableTabContributor(\r
-                                new PlaybackExperimentTab(),\r
+                                new PlaybackExperimentTab(r),\r
                                 0,\r
                                 r,\r
                                 "Experiment Properties"));\r
@@ -362,7 +362,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if (backend.isInstanceOf(r, sr.GameExperiment))\r
                 return Collections.singleton(\r
                         new ComparableTabContributor(\r
-                                new GameExperimentTab(),\r
+                                new GameExperimentTab(r),\r
                                 0,\r
                                 r,\r
                                 "Experiment Properties"));\r
@@ -371,7 +371,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if (backend.isInstanceOf(r, sr.SensitivityAnalysisExperiment))\r
                 return Collections.singleton(\r
                         new ComparableTabContributor(\r
-                                new SensitivityAnalysisExperimentTab(),\r
+                                new SensitivityAnalysisExperimentTab(r),\r
                                 0,\r
                                 r,\r
                                 "Experiment Properties"));\r
@@ -380,7 +380,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if (backend.isInstanceOf(r, simu.Experiment))\r
                 return Collections.singleton(\r
                         new ComparableTabContributor(\r
-                                new ExperimentTab(),\r
+                                new ExperimentTab(r),\r
                                 0,\r
                                 r,\r
                                 "Experiment Properties"));\r
@@ -389,7 +389,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if (backend.isInstanceOf(r, sr.HistoryDataset))\r
                 return Collections.singleton(\r
                         new ComparableTabContributor(\r
-                                new HistoryDataTab(),\r
+                                new HistoryDataTab(r),\r
                                 0,\r
                                 r,\r
                                 "History Data Properties"));\r
@@ -398,7 +398,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if (backend.isInstanceOf(r, sr.Result))\r
                 return Collections.singleton(\r
                         new ComparableTabContributor(\r
-                                new ResultTab(),\r
+                                new ResultTab(r),\r
                                 0,\r
                                 r,\r
                                 "Result Properties"));\r
@@ -409,7 +409,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                     Resource diaConnection = backend.getPossibleObject(r, ModelingResources.getInstance(backend).ConnectionToDiagramConnection);\r
                     return Collections.singleton(\r
                             new ComparableTabContributor(\r
-                                    new DependencyTab(),\r
+                                    new DependencyTab(diaConnection),\r
                                     0,\r
                                     diaConnection,\r
                                     "Reference Properties"));\r
@@ -417,7 +417,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                     Resource diaConnection = backend.getPossibleObject(r, ModelingResources.getInstance(backend).ConnectionToDiagramConnection);\r
                     return Collections.singleton(\r
                             new ComparableTabContributor(\r
-                                    new DependencyTab(),\r
+                                    new DependencyTab(diaConnection),\r
                                     0,\r
                                     diaConnection,\r
                                     "Dependency Properties"));\r
@@ -428,7 +428,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                Resource diaConnection = backend.getPossibleObject(r, ModelingResources.getInstance(backend).ConnectionToDiagramConnection);\r
                return Collections.singleton(\r
                        new ComparableTabContributor(\r
-                                       new FlowTab(),\r
+                                       new FlowTab(diaConnection),\r
                                        0,\r
                                        diaConnection,\r
                                        "Flow Properties"));\r
@@ -441,7 +441,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                 if(r != null)\r
                     return Collections.singleton(\r
                             new ComparableTabContributor(\r
-                                    new ModuleTypeTab(),\r
+                                    new ModuleTypeTab(r),\r
                                     0,\r
                                     r,\r
                                     "Module Type Properties"));\r
@@ -450,12 +450,12 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             // Function\r
             if (backend.isInstanceOf(r, sr.SysdynModelicaFunction)) {\r
                 tabs.add(new ComparableTabContributor(\r
-                        new FunctionTab(),\r
+                        new FunctionTab(r),\r
                         2,\r
                         r,\r
                         "Function"));\r
                 tabs.add(new ComparableTabContributor(\r
-                        new ExternalFilesTab(),\r
+                        new ExternalFilesTab(r),\r
                         1,\r
                         r,\r
                         "External files"));\r
@@ -469,7 +469,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
                     s = r;\r
                 // give either variable or the actual resource\r
                 return Collections.singleton(new ComparableTabContributor(\r
-                        new FunctionLibraryTab(),\r
+                        new FunctionLibraryTab(s),\r
                         2,\r
                         s,\r
                         "Function library"));\r
@@ -489,7 +489,7 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
             if (backend.isInstanceOf(r, sr.AdditionalSymbols_MultilineText))\r
                 return Collections.singleton(\r
                         new ComparableTabContributor(\r
-                                new CommentTab(),\r
+                                new CommentTab(r),\r
                                 0,\r
                                 r,\r
                                 "Comment"));\r
@@ -519,17 +519,17 @@ public class ResourceSelectionProcessor implements SelectionProcessor<Object, Re
 \r
                 if(backend.isInstanceOf(plot, SysdynResource.getInstance(backend).Charts_SensitivityPlot)) {\r
                     tabs.add(new ComparableTabContributor(\r
-                            new XYLineGeneralPropertiesTab(),\r
+                            new XYLineGeneralPropertiesTab(r),\r
                             10,\r
                             r,\r
                             "General"));\r
                     tabs.add(new ComparableTabContributor(\r
-                            new SensitivityChartAxisAndVariablesTab(),\r
+                            new SensitivityChartAxisAndVariablesTab(r),\r
                             9,\r
                             r,\r
                             "Axis and Variables"));\r
                     tabs.add(new ComparableTabContributor(\r
-                            new ChartTab(),\r
+                            new ChartTab(r),\r
                             1,\r
                             r,\r
                             "Chart"));\r
index fee1f4c97a33e36e1b546f22bbd0b8aae3149992..0fff894541ee342775be7f4de37ecf7a83136a12 100644 (file)
@@ -19,6 +19,10 @@ import org.simantics.jfreechart.chart.properties.LabelPropertyTabContributor;
 \r
 public class ResultTab extends LabelPropertyTabContributor {\r
 \r
+    public ResultTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
         \r
index ee1a45557a907e69313ceeb08fc284ef106804ef..60b3fdc200ce8c2342dad4e1513f429b50f7b9a2 100644 (file)
@@ -95,6 +95,10 @@ import org.simantics.utils.ui.validators.IntegerValidator;
  */\r
 public class SensitivityAnalysisExperimentTab extends AdjustableTab implements Widget {\r
 \r
+    public SensitivityAnalysisExperimentTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     private GraphExplorerComposite explorer;\r
     private WidgetSupportImpl parameterSupport = new WidgetSupportImpl();\r
     private ScrolledComposite propertyContainer;\r
index ac3d2e74d738b9a6dde7490362c12678c2df8b81..b8b08e41ae965dbaf77ceb2f01ab5641de7ca65c 100644 (file)
@@ -48,7 +48,11 @@ import org.simantics.utils.ui.AdaptionUtils;
 \r
 public class SharedFunctionLibrariesTab extends LabelPropertyTabContributor implements Widget {\r
        \r
-       GraphExplorerComposite availableSharedFunctionLibraries;\r
+       public SharedFunctionLibrariesTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
+    GraphExplorerComposite availableSharedFunctionLibraries;\r
        GraphExplorerComposite usedSharedFunctionLibraries;\r
        Resource model;\r
 \r
@@ -234,6 +238,5 @@ public class SharedFunctionLibrariesTab extends LabelPropertyTabContributor impl
                usedSharedFunctionLibraries.setInput(context, input);\r
                this.model = AdaptionUtils.adaptToSingle(input, Resource.class);\r
        }\r
-\r
 }\r
 \r
index 2e4fc80143161a57c5e6d248f80b9e2242886e37..f091b37ab32868d896a104784c2e2bc4c3f2406b 100644 (file)
@@ -40,6 +40,7 @@ import org.simantics.db.Resource;
 import org.simantics.db.WriteGraph;\r
 import org.simantics.db.common.utils.NameUtils;\r
 import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.util.Layer0Utils;\r
 import org.simantics.db.management.ISessionContext;\r
 import org.simantics.db.procedure.Listener;\r
 import org.simantics.db.request.Read;\r
@@ -68,6 +69,11 @@ import org.simantics.utils.ui.validators.DoubleValidator;
  *\r
  */\r
 public class VariableInformationTab extends AdjustableTab implements Widget {\r
+    \r
+    public VariableInformationTab(Object id) {\r
+        super(id);\r
+    }\r
+\r
     private Composite orientationComposite;\r
     private WidgetSupport support;\r
     private Resource component;\r
@@ -428,5 +434,4 @@ public class VariableInformationTab extends AdjustableTab implements Widget {
         GridDataFactory.fillDefaults().applyTo(fontComposite);\r
         GridLayoutFactory.fillDefaults().numColumns(2).applyTo(fontComposite);\r
        }\r
-\r
 }\r
index ab53b0f848129ba6137d01b212db63bb16006818..c414bf94bfbeaa01fb5fa421480b20ba191e1a79 100644 (file)
@@ -48,7 +48,8 @@ public class SensitivityChartAxisAndVariablesTab extends AdjustableTab {
     private ScrolledComposite propertyContainer;\r
     private WidgetSupportImpl additionalSupport;\r
 \r
-    public SensitivityChartAxisAndVariablesTab() {\r
+    public SensitivityChartAxisAndVariablesTab(Object id) {\r
+        super(id);\r
         additionalSupport = new WidgetSupportImpl();\r
     }\r
 \r