]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
All tabs use LabelPropertyTabContributor to provide proper names for tabs.
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 28 Apr 2011 13:44:43 +0000 (13:44 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 28 Apr 2011 13:44:43 +0000 (13:44 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20615 ac1ea38d-2e2b-0410-8846-a27921b304fc

22 files changed:
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ArrayIndexesTab.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/FunctionLibraryTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/FunctionTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/InputVariableTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/LabelPropertyTabContributor.java [new file with mode: 0644]
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/LookupTableTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModelTab.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/ModuleTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ModuleTypeTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ReferenceDependencyTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResultTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/SharedFunctionLibrariesTab.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/SysdynPropertyPage.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/VariableInformationTab.java

index 2e61a13aa0dfee9e244c327bf4de0fcda6dfaca9..0f27567730f9f031318893e2a9478b8ee6d7880a 100644 (file)
@@ -15,7 +15,6 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Tree;\r
 import org.eclipse.ui.IWorkbenchSite;\r
 import org.simantics.browsing.ui.swt.AdaptableHintContext;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.SingleSelectionInputSource;\r
 import org.simantics.browsing.ui.swt.widgets.Button;\r
 import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
@@ -31,7 +30,7 @@ import org.simantics.sysdyn.SysdynResource;
 import org.simantics.sysdyn.ui.properties.widgets.ColumnKeys;\r
 import org.simantics.utils.datastructures.ArrayMap;\r
 \r
-public class ArrayIndexesTab extends PropertyTabContributorImpl implements Widget{\r
+public class ArrayIndexesTab extends LabelPropertyTabContributor implements Widget{\r
 \r
        GraphExplorerComposite availableEnumerationsExplorer;\r
        GraphExplorerComposite usedEnumerationsExplorer;\r
index 512532ab092bfe8a077b1505216ac2444247056b..f87760de0302425ac762e523cda2682ddd44e611 100644 (file)
@@ -21,16 +21,16 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.swt.widgets.Label;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
-import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedCombo;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
 import org.simantics.browsing.ui.swt.widgets.impl.ReadFactoryImpl;\r
+import org.simantics.browsing.ui.swt.widgets.impl.TextModifyListenerImpl;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 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.management.ISessionContext;\r
 import org.simantics.layer0.Layer0;\r
@@ -40,8 +40,22 @@ import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyFactor
 import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyModifier;\r
 import org.simantics.sysdyn.ui.utils.VariableNameUtils;\r
 \r
-public class ConfigurationTab extends PropertyTabContributorImpl {\r
-\r
+public class ConfigurationTab extends LabelPropertyTabContributor {\r
+\r
+       private class ModelLabelModifier extends TextModifyListenerImpl<Resource> {\r
+\r
+               public ModelLabelModifier(ISessionContext context, String propertyURI) {\r
+               }\r
+               \r
+       @Override\r
+       public void applyText(WriteGraph graph, Resource issue, String text) throws DatabaseException {\r
+               Layer0 l0 = Layer0.getInstance(graph);\r
+            graph.claimLiteral(issue, l0.HasLabel, text);\r
+            String safeName = NameUtils.findFreshName(graph, text, graph.getSingleObject(issue, l0.PartOf), l0.ConsistsOf, "%s%d");\r
+            graph.claimLiteral(issue, l0.HasName, safeName);\r
+       }\r
+               \r
+       }\r
     \r
     \r
     @Override\r
@@ -55,7 +69,7 @@ public class ConfigurationTab extends PropertyTabContributorImpl {
         \r
         TrackedText name = new TrackedText(composite, support, SWT.BORDER);\r
         name.setTextFactory(new StringPropertyFactory(Layer0.URIs.HasLabel));\r
-        name.addModifyListener(new StringPropertyModifier(context, Layer0.URIs.HasLabel));\r
+        name.addModifyListener(new ModelLabelModifier(context, Layer0.URIs.HasLabel));\r
         name.setInputValidator(new IInputValidator() {\r
             \r
             @Override\r
index ac5507ccfbe26ec99edbe18c0ad26297b6d9d160..1119f941b05d7847f75b16dde2288e8e1063f9a1 100644 (file)
@@ -16,7 +16,6 @@ import org.eclipse.jface.layout.GridLayoutFactory;
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
@@ -24,7 +23,7 @@ import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;
 import org.simantics.db.management.ISessionContext;\r
 import org.simantics.layer0.Layer0;\r
 \r
-public class DependencyTab  extends PropertyTabContributorImpl {\r
+public class DependencyTab  extends LabelPropertyTabContributor {\r
 \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
index ee23bcc114f4e81da6368a9e74ff73a744d71a05..3d88d8496f0b34d3b498528e3a0cda90a3a41c40 100644 (file)
@@ -17,7 +17,6 @@ import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeItem;\r
 import org.eclipse.ui.IWorkbenchSite;\r
 import org.simantics.browsing.ui.NodeContext;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.SingleSelectionInputSource;\r
 import org.simantics.browsing.ui.swt.widgets.Button;\r
 import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
@@ -52,7 +51,7 @@ import org.simantics.ui.SimanticsUI;
 import org.simantics.ui.utils.AdaptionUtils;\r
 import org.simantics.utils.datastructures.ArrayMap;\r
 \r
-public class EnumerationTab extends PropertyTabContributorImpl implements Widget {\r
+public class EnumerationTab extends LabelPropertyTabContributor implements Widget {\r
 \r
        GraphExplorerComposite indexExplorer;\r
        \r
index 21e8764ecb53a018505bd756594f07ae6bdc19f4..ba68d2c95425ee212d9c659f0a57bf266008a54f 100644 (file)
@@ -38,7 +38,6 @@ import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.ui.IWorkbenchPartReference;\r
 import org.eclipse.ui.IWorkbenchSite;\r
 import org.simantics.browsing.ui.platform.PropertyPageView;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.Button;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedCombo;\r
 import org.simantics.browsing.ui.swt.widgets.impl.ComboModifyListenerImpl;\r
@@ -76,7 +75,7 @@ import org.simantics.ui.SimanticsUI;
 import org.simantics.ui.utils.AdaptionUtils;\r
 import org.simantics.utils.datastructures.Pair;\r
 \r
-public class EquationTab extends PropertyTabContributorImpl implements Widget {\r
+public class EquationTab extends LabelPropertyTabContributor implements Widget {\r
 \r
        TrackedCombo expressionTypeCombo, unitCombo, arrayEquationCombo;\r
        ShortcutTabWidget shortcutTabWidget;\r
index 7a97aeb5e45ddaac1bf957a49565c4a721f77f31..8d4aa90be5c4f530d6e4ff8ce63b1cbac8f588c8 100644 (file)
@@ -13,11 +13,10 @@ package org.simantics.sysdyn.ui.properties;
 \r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
 import org.simantics.db.management.ISessionContext;\r
 \r
-public class ExperimentTab extends PropertyTabContributorImpl {\r
+public class ExperimentTab extends LabelPropertyTabContributor {\r
 \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
index 7abe614235a3932bf98aec501b8af34266bffc38..b965ed6a28cbb4595b3576a067918bc9bd9981dc 100644 (file)
@@ -19,7 +19,6 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;\r
 import org.eclipse.swt.widgets.Tree;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.SingleSelectionInputSource;\r
 import org.simantics.browsing.ui.swt.widgets.Button;\r
 import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
@@ -36,7 +35,7 @@ import org.simantics.ui.SimanticsUI;
 import org.simantics.utils.datastructures.ArrayMap;\r
 import org.simantics.utils.datastructures.Pair;\r
 \r
-public class ExternalFilesTab extends PropertyTabContributorImpl implements Widget {\r
+public class ExternalFilesTab extends LabelPropertyTabContributor implements Widget {\r
 \r
        GraphExplorerComposite externalFilesExplorer;\r
        Button importButton; \r
index abbdacf40610c6e6a36089c07419ee247dd078ac..b198c15dd509830d1d53b75789a13ae7b6d8f20f 100644 (file)
@@ -16,7 +16,6 @@ import org.eclipse.jface.layout.GridLayoutFactory;
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
@@ -24,7 +23,7 @@ import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;
 import org.simantics.db.management.ISessionContext;\r
 import org.simantics.layer0.Layer0;\r
 \r
-public class FunctionLibraryTab extends PropertyTabContributorImpl {\r
+public class FunctionLibraryTab extends LabelPropertyTabContributor {\r
 \r
        @Override\r
        public void createControls(Composite body, IWorkbenchSite site,\r
index 6a161ba5127f1b5958433bc9b70fe09593765db7..2d7e2c22e42e9ff719ff763642a7eecff8637267 100644 (file)
@@ -17,7 +17,6 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.swt.widgets.Group;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.Label;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier;\r
@@ -33,7 +32,7 @@ import org.simantics.sysdyn.SysdynResource;
 import org.simantics.sysdyn.manager.FunctionUtils;\r
 import org.simantics.sysdyn.ui.properties.widgets.FunctionLabelFactory;\r
 \r
-public class FunctionTab extends PropertyTabContributorImpl {\r
+public class FunctionTab extends LabelPropertyTabContributor {\r
 \r
        @Override\r
        public void createControls(Composite body, IWorkbenchSite site,\r
index acc53a50d6a17692bc0b32d69a083c1ef8b48f7e..661be836577a3193c36f553a1e82a48f8bf9e0e7 100644 (file)
@@ -19,7 +19,6 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.swt.widgets.Label;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
@@ -32,7 +31,7 @@ import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyModifi
 import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNamePropertyModifier;\r
 import org.simantics.sysdyn.ui.properties.widgets.factories.VariableNameValidator;\r
 \r
-public class InputVariableTab  extends PropertyTabContributorImpl {\r
+public class InputVariableTab  extends LabelPropertyTabContributor {\r
 \r
     \r
     @Override\r
diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/LabelPropertyTabContributor.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/LabelPropertyTabContributor.java
new file mode 100644 (file)
index 0000000..2d9d76c
--- /dev/null
@@ -0,0 +1,63 @@
+package org.simantics.sysdyn.ui.properties;\r
+\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
+import org.simantics.db.AsyncReadGraph;\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.procedure.AsyncListener;\r
+import org.simantics.db.request.Read;\r
+import org.simantics.layer0.Layer0;\r
+import org.simantics.ui.SimanticsUI;\r
+import org.simantics.ui.utils.AdaptionUtils;\r
+import org.simantics.utils.datastructures.Callback;\r
+\r
+public abstract class LabelPropertyTabContributor extends PropertyTabContributorImpl {\r
+\r
+       \r
+    public void updatePartName(ISelection forSelection, final Callback<String> updateCallback) {\r
+       final Resource r = AdaptionUtils.adaptToSingle(forSelection, Resource.class);\r
+       if(r == null) {\r
+               updateCallback.run("Selection properties");\r
+               return;\r
+       }\r
+       \r
+       try {\r
+                       SimanticsUI.getSession().syncRequest(new Read<String>() {\r
+\r
+                               @Override\r
+                               public String perform(ReadGraph graph) throws DatabaseException {\r
+                                       Layer0 l0 = Layer0.getInstance(graph);\r
+                                       String label = graph.getPossibleRelatedValue(r, l0.HasLabel);\r
+                                       if(label != null)\r
+                                               return label;\r
+                                       label = graph.getPossibleRelatedValue(r, l0.HasName);\r
+                                       if(label != null)\r
+                                               return label;\r
+                                       return "No name for selection";\r
+                               }\r
+                       }, new AsyncListener<String>() {\r
+\r
+                               @Override\r
+                               public void execute(AsyncReadGraph graph, String result) {\r
+                                       updateCallback.run(result);\r
+                               }\r
+\r
+                               @Override\r
+                               public void exception(AsyncReadGraph graph, Throwable throwable) {\r
+                                       \r
+                               }\r
+\r
+                               @Override\r
+                               public boolean isDisposed() {\r
+                                       return false;\r
+                               }\r
+                       });\r
+               } catch (DatabaseException e) {\r
+                       updateCallback.run("Selection error in LabelPropertyTabContributor");\r
+                       e.printStackTrace();\r
+               }\r
+               \r
+    }\r
+}\r
index a6d756c51902fddb2e1a9dd50da44cb35c889c36..678227ff02369f884b7028762c129f768e522170 100644 (file)
@@ -17,7 +17,6 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.swt.widgets.Label;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
 import org.simantics.db.management.ISessionContext;\r
@@ -27,7 +26,7 @@ import org.simantics.sysdyn.ui.properties.widgets.ChartWidget;
 import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyFactory;\r
 import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyModifier;\r
 \r
-public class LookupTableTab extends PropertyTabContributorImpl {\r
+public class LookupTableTab extends LabelPropertyTabContributor {\r
     \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
index 93f1269021eed438ca55b14df48d2196dd8b8d9c..77ea180ac852d3f02f48310e4fe658e74f349d6e 100644 (file)
@@ -13,11 +13,10 @@ package org.simantics.sysdyn.ui.properties;
 \r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
 import org.simantics.db.management.ISessionContext;\r
 \r
-public class ModelTab extends PropertyTabContributorImpl {\r
+public class ModelTab extends LabelPropertyTabContributor {\r
 \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
index 5f59b45568b4424b65aacae9abdab89d867ea90e..f188749c9ac5cac38be7164b02219b7a693a4aca 100644 (file)
@@ -18,7 +18,6 @@ import org.eclipse.jface.viewers.TableViewerColumn;
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
@@ -29,12 +28,12 @@ import org.simantics.layer0.Layer0;
 import org.simantics.structural.stubs.StructuralResource2;\r
 import org.simantics.sysdyn.SysdynResource;\r
 import org.simantics.sysdyn.ui.properties.widgets.ModuleInputEditingSupport;\r
-import org.simantics.sysdyn.ui.properties.widgets.ReferenceTable;\r
 import org.simantics.sysdyn.ui.properties.widgets.ReferenceRow;\r
-import org.simantics.sysdyn.ui.properties.widgets.RowProvider;\r
 import org.simantics.sysdyn.ui.properties.widgets.ReferenceRowLabelProvider;\r
+import org.simantics.sysdyn.ui.properties.widgets.ReferenceTable;\r
+import org.simantics.sysdyn.ui.properties.widgets.RowProvider;\r
 \r
-public class ModuleInputTab  extends PropertyTabContributorImpl {\r
+public class ModuleInputTab extends LabelPropertyTabContributor {\r
 \r
     public static final String FIRSTCOLUMN = "Input in Module";\r
     public static final String SECONDCOLUMN = "Refers to output";\r
index cb75f97ab2973d5d29aa4ac9f7066b0c23f47269..29c2819f17bb2f30018bc5b877f0a3737c4f9628 100644 (file)
@@ -18,7 +18,6 @@ import org.eclipse.jface.viewers.TableViewerColumn;
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
@@ -34,7 +33,7 @@ import org.simantics.sysdyn.ui.properties.widgets.ReferenceRowLabelProvider;
 import org.simantics.sysdyn.ui.properties.widgets.ReferenceTable;\r
 import org.simantics.sysdyn.ui.properties.widgets.RowProvider;\r
 \r
-public class ModuleOutputTab   extends PropertyTabContributorImpl {\r
+public class ModuleOutputTab extends LabelPropertyTabContributor {\r
 \r
     public static final String FIRSTCOLUMN = "Output in module";\r
     public static final String SECONDCOLUMN = "Referes to input";\r
index 1c44fcdba5b5bbed53c145e07585c7daa266cdb4..acde5e3628cb45a9fafc51bf65ab62fc399b1f01 100644 (file)
@@ -19,7 +19,6 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;\r
 import org.eclipse.swt.widgets.Tree;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.SingleSelectionInputSource;\r
 import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
@@ -33,7 +32,7 @@ import org.simantics.layer0.Layer0;
 import org.simantics.sysdyn.ui.properties.widgets.ColumnKeys;\r
 import org.simantics.utils.datastructures.ArrayMap;\r
 \r
-public class ModuleTab extends PropertyTabContributorImpl implements Widget {\r
+public class ModuleTab extends LabelPropertyTabContributor implements Widget {\r
 \r
        GraphExplorerComposite enumerationRedeclarationExplorer;\r
        \r
index 5910e9acc0d5723d4e20b152c8420dd0e03bf64b..fe40aee7d018809099e9ba8a17696600ff9d52ca 100644 (file)
@@ -16,7 +16,6 @@ import org.eclipse.jface.layout.GridLayoutFactory;
 import org.eclipse.swt.SWT;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
@@ -24,7 +23,7 @@ import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;
 import org.simantics.db.management.ISessionContext;\r
 import org.simantics.layer0.Layer0;\r
 \r
-public class ModuleTypeTab extends PropertyTabContributorImpl {\r
+public class ModuleTypeTab extends LabelPropertyTabContributor {\r
 \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
index 0ed0d0ea271c0876e8ab2daf9511cd4c086bea63..cc8f4384e04070d7ed498b5024b0792b42593aa1 100644 (file)
@@ -13,11 +13,10 @@ package org.simantics.sysdyn.ui.properties;
 \r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
 import org.simantics.db.management.ISessionContext;\r
 \r
-public class ReferenceDependencyTab extends PropertyTabContributorImpl {\r
+public class ReferenceDependencyTab extends LabelPropertyTabContributor {\r
 \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
index 020dd97fc77390f199890989b73ec272114ad47a..306cd84025d61ca6ee0c932ccd8225b33adc27d6 100644 (file)
@@ -13,11 +13,10 @@ package org.simantics.sysdyn.ui.properties;
 \r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
 import org.simantics.db.management.ISessionContext;\r
 \r
-public class ResultTab extends PropertyTabContributorImpl {\r
+public class ResultTab extends LabelPropertyTabContributor {\r
 \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
index 75e3ac1b152ba8b88273399888b073fd45d7e001..d3d855a309df1577b8556a49d87613b3d7bc51c5 100644 (file)
@@ -27,7 +27,6 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.IWorkbenchSite;\r
 import org.simantics.browsing.ui.NodeContext;\r
 import org.simantics.browsing.ui.swt.AdaptableHintContext;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.SingleSelectionInputSource;\r
 import org.simantics.browsing.ui.swt.widgets.Button;\r
 import org.simantics.browsing.ui.swt.widgets.GraphExplorerComposite;\r
@@ -45,7 +44,7 @@ import org.simantics.ui.SimanticsUI;
 import org.simantics.ui.utils.AdaptionUtils;\r
 import org.simantics.utils.datastructures.ArrayMap;\r
 \r
-public class SharedFunctionLibrariesTab extends PropertyTabContributorImpl implements Widget {\r
+public class SharedFunctionLibrariesTab extends LabelPropertyTabContributor implements Widget {\r
        \r
        GraphExplorerComposite availableSharedFunctionLibraries;\r
        GraphExplorerComposite usedSharedFunctionLibraries;\r
index 44f9e8a0fdeba8f0c48537c413d38739a83fd100..b7ba338f7c0947154b0936cb3d02db5e83467d24 100644 (file)
@@ -13,22 +13,12 @@ package org.simantics.sysdyn.ui.properties;
 \r
 import java.util.Set;\r
 \r
-import org.eclipse.jface.viewers.ISelection;\r
 import org.eclipse.ui.IWorkbenchPartSite;\r
 import org.simantics.browsing.ui.swt.StandardPropertyPage;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.modeling.ModelingUtils;\r
 \r
 public class SysdynPropertyPage extends StandardPropertyPage {\r
 \r
     public SysdynPropertyPage(IWorkbenchPartSite site, Set<String> set) {\r
         super(site, set);\r
     }\r
-\r
-    @Override\r
-    protected String computeTitle(ReadGraph graph, ISelection selection) throws DatabaseException {\r
-        return ModelingUtils.computeTitle(graph, selection, MAX_SELECTION_LENGTH_TO_SHOW, true);\r
-    }\r
-\r
 }\r
index 92bacb2be7133750b5403b1168730608f5106c0c..9a3b21e8d015c746030ce7b810221c9d05bc8770 100644 (file)
@@ -19,7 +19,6 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;\r
 import org.eclipse.swt.widgets.Label;\r
 import org.eclipse.ui.IWorkbenchSite;\r
-import org.simantics.browsing.ui.swt.PropertyTabContributorImpl;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyFactory;\r
 import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier;\r
 import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
@@ -30,7 +29,7 @@ import org.simantics.sysdyn.SysdynResource;
 import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyFactory;\r
 import org.simantics.sysdyn.ui.properties.widgets.factories.DoublePropertyModifier;\r
 \r
-public class VariableInformationTab extends PropertyTabContributorImpl {\r
+public class VariableInformationTab extends LabelPropertyTabContributor {\r
 \r
     @Override\r
     public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r