From 49f442c0f8208023aef1877ebc300d79622bd906 Mon Sep 17 00:00:00 2001 From: lempinen Date: Tue, 18 May 2010 11:05:53 +0000 Subject: [PATCH] Better structure, context menus and icons to model browser git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@15769 ac1ea38d-2e2b-0410-8846-a27921b304fc --- org.simantics.sysdyn.ui/adapters.xml | 2 +- org.simantics.sysdyn.ui/icons/brick.png | Bin 0 -> 452 bytes .../icons/chart_organisation.png | Bin 0 -> 444 bytes org.simantics.sysdyn.ui/icons/folder.png | Bin 0 -> 537 bytes org.simantics.sysdyn.ui/plugin.xml | 64 ++++++++++++------ .../org/simantics/sysdyn/ui/Activator.java | 13 ++++ .../contributions/AbstractNodeImager.java | 16 +++-- .../browser/contributions/Configuration.java | 42 ------------ .../contributions/ConfigurationImager.java | 16 +++++ .../ui/browser/contributions/Experiment.java | 3 +- .../ui/browser/contributions/Experiments.java | 36 ---------- .../contributions/ExperimentsImager.java | 16 +++++ .../browser/contributions/ModelChildren.java | 34 ++++++++++ .../ui/browser/contributions/ModelImager.java | 16 +++++ .../contributions/OperatingInterfaces.java | 25 ------- .../browser/contributions/VariableImager.java | 16 +++++ .../ui/browser/nodes/ConfigurationNode.java | 20 +----- .../sysdyn/ui/editor/SysdynDiagramEditor.java | 16 +++-- 18 files changed, 181 insertions(+), 154 deletions(-) create mode 100644 org.simantics.sysdyn.ui/icons/brick.png create mode 100644 org.simantics.sysdyn.ui/icons/chart_organisation.png create mode 100644 org.simantics.sysdyn.ui/icons/folder.png delete mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Configuration.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ConfigurationImager.java delete mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Experiments.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ExperimentsImager.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModelChildren.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModelImager.java delete mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/OperatingInterfaces.java create mode 100644 org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableImager.java diff --git a/org.simantics.sysdyn.ui/adapters.xml b/org.simantics.sysdyn.ui/adapters.xml index fda0571f..62f8e6df 100644 --- a/org.simantics.sysdyn.ui/adapters.xml +++ b/org.simantics.sysdyn.ui/adapters.xml @@ -25,5 +25,5 @@ - + \ No newline at end of file diff --git a/org.simantics.sysdyn.ui/icons/brick.png b/org.simantics.sysdyn.ui/icons/brick.png new file mode 100644 index 0000000000000000000000000000000000000000..7851cf34c946e5667221e3478668503eb1cd733f GIT binary patch literal 452 zcmV;#0XzPQP)Pdwe5?6tW?r-ok|b$oDQj8FV%kZPq;(MWOV8?8;<)(iP}>hNMU> z7fbz%jjlr7h8uuoQ~J6}n}@Y@PdTk=)PxO{%7zmL?dchpZX*~n;I{!C>*(8cU;q(~ zAS%Po_@naEU!xidrBXD?;hN|x^%W|Ij)0y*r5vi|?W&Fub(NqJ@z0o=OF_A89qTKGV%LqLqA&{k|D2>yV7qLmg~*x1@cbjz3zP!z2FhV16<-TNNz zuIz$fLNt0{xWmll%$dUkM1*+|PHJ2ZGvdmC35A3UoF6R(-~DS$BH+@Xy#VYsLyQ>z zxq>v8$ny|FSR~0W2u4ic`k5mcbEIiLksz4Y#KyE{9LLn}_oq&%6$}Oga?Zh83$3-^ zU4V1$eaMkz85m>bTh*c{3ch%tltQ=L4Q7$u>-Ff*JP6K)r(~Ul_41v6uR1rSij#*! zl14&E?hS3Iagod#Oo#p}d7WbijUO{Mqc5?@<$>unxw*22 z?bQuGkPsSMOgEm)qR1=cLLyZOm>T65_V?)|o0p=i_uUiST44Cz-W mqJp!8r`H!$*8T4x&4Leh&Epbde3h>N0000x(K@^6+>g^d@v4;gkbWsEoXE%32*i1tcpTNXd5CcIl)ECgqz|2rE6EW}s7R?kl za1q`0GCkMruC6-2LANtwVlsgzsp4?{@7$`KBv!G66>Vie3h?3OmEEkjwdLG0PgLVi z`!N((f$A@n17Ldj#`};0I3@iHJ5M{#IZz|UIYRm4(!uV7eYIYIwQf&}_2J~}>pQ^n z6o8--^T(=hkBNQ_k{-_GWE;FMW7!p}f{NG3nHZ{D5<3d8&tLh%a4AqqnjMkr3m&fkMdECD3N5}Unig5wy40;>lo4j~k+e}v)` zR6)J8Mk*u=SpB`p6o)7j?S0T@9?bz#m@l>gc*zk__|*!FMcHwP!gwLJvS~9c0px8E zW + args="org.simantics.sysdyn.ui.browser.nodes.ModelNode" + property="org.simantics.sysdyn.ui.nodeClass"> @@ -320,8 +320,8 @@ + args="org.simantics.sysdyn.ui.browser.nodes.ModelNode" + property="org.simantics.sysdyn.ui.nodeClass"> @@ -356,25 +356,17 @@ point="org.simantics.browsing.ui.common.viewpointContributionBinding"> - - - - + class="org.simantics.sysdyn.ui.browser.contributions.ModelChildren" + preference="2.0"> @@ -384,28 +376,60 @@ browseContext="http://www.simantics.org/Sysdyn-1.0/Browser"> + preference="2.0"> + preference="2.0"> + preference="2.0"> + preference="2.0"> + preference="2.0"> + preference="2.0"> + + + + + + + + + + + + + + + + diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/Activator.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/Activator.java index 20d0e65b..54140cc4 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/Activator.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/Activator.java @@ -23,6 +23,9 @@ public class Activator extends AbstractUIPlugin { // The plug-in ID public static final String PLUGIN_ID = "org.simantics.sysdyn.ui"; + + // The shared instance + private static Activator plugin; @Override public void start(BundleContext context) throws Exception { @@ -31,6 +34,16 @@ public class Activator extends AbstractUIPlugin { new ConsoleAppender(new SimpleLayout()); BasicConfigurator.configure(appender); Logger.getRootLogger().setLevel(Level.WARN); + plugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); } + public static Activator getDefault() { + return plugin; + } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/AbstractNodeImager.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/AbstractNodeImager.java index f0557825..977d54e8 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/AbstractNodeImager.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/AbstractNodeImager.java @@ -15,17 +15,23 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.simantics.browsing.ui.swt.ImagerContributor; import org.simantics.db.ReadGraph; import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.ui.Activator; import org.simantics.sysdyn.ui.browser.nodes.AbstractNode; -import org.simantics.ui.icons.ImageDescriptorProvider; +import org.simantics.sysdyn.ui.browser.nodes.ExperimentsFolder; +import org.simantics.sysdyn.ui.browser.nodes.ModulesNode; +import org.simantics.sysdyn.ui.browser.nodes.OperatingInterfacesFolder; public class AbstractNodeImager extends ImagerContributor { @Override public ImageDescriptor getDescriptor(ReadGraph graph, AbstractNode node) throws DatabaseException { - if (!graph.hasStatement(node.resource)) - return null; - ImageDescriptorProvider provider = graph.adapt(node.resource, ImageDescriptorProvider.class); - return provider != null ? provider.get() : null; + + if (node instanceof ExperimentsFolder || + node instanceof OperatingInterfacesFolder || + node instanceof ModulesNode) + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/folder.png")); + + return null; } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Configuration.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Configuration.java deleted file mode 100644 index 171280e4..00000000 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Configuration.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.sysdyn.ui.browser.contributions; - -import java.util.Collection; - -import org.simantics.browsing.ui.graph.contributor.viewpoint.ViewpointContributor; -import org.simantics.db.ReadGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.sysdyn.ui.browser.nodes.AbstractNode; -import org.simantics.sysdyn.ui.browser.nodes.ConfigurationNode; -import org.simantics.sysdyn.ui.browser.nodes.ModelNode; -import org.simantics.utils.DataContainer; - -public class Configuration extends ViewpointContributor { - - @Override - public Collection getContribution(ReadGraph graph, ModelNode model) - throws DatabaseException { - return new DataContainer(new ConfigurationNode( - graph.getSingleObject( - model.resource, - graph.getBuiltins().HasConfiguration)) - ); - - } - - @Override - public String getViewpointId() { - return "Standard"; - } - -} \ No newline at end of file diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ConfigurationImager.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ConfigurationImager.java new file mode 100644 index 00000000..e8f1f917 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ConfigurationImager.java @@ -0,0 +1,16 @@ +package org.simantics.sysdyn.ui.browser.contributions; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.browsing.ui.swt.ImagerContributor; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.ui.Activator; +import org.simantics.sysdyn.ui.browser.nodes.ConfigurationNode; + +public class ConfigurationImager extends ImagerContributor { + + @Override + public ImageDescriptor getDescriptor(ReadGraph graph, ConfigurationNode node) throws DatabaseException { + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/bricks.png")); + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Experiment.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Experiment.java index d80b0313..4d5766a4 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Experiment.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Experiment.java @@ -12,6 +12,7 @@ package org.simantics.sysdyn.ui.browser.contributions; import java.util.Collection; +import java.util.Collections; import org.simantics.browsing.ui.graph.contributor.viewpoint.ViewpointContributor; import org.simantics.db.ReadGraph; @@ -23,7 +24,7 @@ public class Experiment extends ViewpointContributor { @Override public Collection getContribution(ReadGraph graph, ExperimentsFolder input) throws DatabaseException { // hasExperiment or something - return null; + return Collections.EMPTY_LIST; } @Override diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Experiments.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Experiments.java deleted file mode 100644 index 1efed43a..00000000 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Experiments.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ - -package org.simantics.sysdyn.ui.browser.contributions; - -import java.util.Collection; - -import org.simantics.browsing.ui.graph.contributor.viewpoint.ViewpointContributor; -import org.simantics.db.ReadGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.sysdyn.ui.browser.nodes.AbstractNode; -import org.simantics.sysdyn.ui.browser.nodes.ExperimentsFolder; -import org.simantics.sysdyn.ui.browser.nodes.ModelNode; -import org.simantics.utils.DataContainer; - -public class Experiments extends ViewpointContributor { - - @Override - public Collection getContribution(ReadGraph graph, ModelNode model) throws DatabaseException { - return new DataContainer(new ExperimentsFolder(model.resource)); - } - - @Override - public String getViewpointId() { - return "Standard"; - } -} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ExperimentsImager.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ExperimentsImager.java new file mode 100644 index 00000000..beb1e804 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ExperimentsImager.java @@ -0,0 +1,16 @@ +package org.simantics.sysdyn.ui.browser.contributions; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.browsing.ui.swt.ImagerContributor; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.ui.Activator; +import org.simantics.sysdyn.ui.browser.nodes.ExperimentsFolder; + +public class ExperimentsImager extends ImagerContributor { + + @Override + public ImageDescriptor getDescriptor(ReadGraph graph, ExperimentsFolder node) throws DatabaseException { + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/folder.png")); + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModelChildren.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModelChildren.java new file mode 100644 index 00000000..d5dc8636 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModelChildren.java @@ -0,0 +1,34 @@ +package org.simantics.sysdyn.ui.browser.contributions; + +import java.util.ArrayList; +import java.util.Collection; +import org.simantics.browsing.ui.graph.contributor.viewpoint.ViewpointContributor; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.ui.browser.nodes.AbstractNode; +import org.simantics.sysdyn.ui.browser.nodes.ConfigurationNode; +import org.simantics.sysdyn.ui.browser.nodes.ExperimentsFolder; +import org.simantics.sysdyn.ui.browser.nodes.ModelNode; +import org.simantics.sysdyn.ui.browser.nodes.OperatingInterfacesFolder; + +public class ModelChildren extends ViewpointContributor { + + @Override + public Collection getContribution(ReadGraph graph, ModelNode model) + throws DatabaseException { + ArrayList result = new ArrayList(); + result.add(new ConfigurationNode( + graph.getSingleObject( + model.resource, + graph.getBuiltins().HasConfiguration)) + ); + result.add(new ExperimentsFolder(model.resource)); + result.add(new OperatingInterfacesFolder(model.resource)); + return result; + } + + @Override + public String getViewpointId() { + return "Standard"; + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModelImager.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModelImager.java new file mode 100644 index 00000000..00e386b5 --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModelImager.java @@ -0,0 +1,16 @@ +package org.simantics.sysdyn.ui.browser.contributions; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.browsing.ui.swt.ImagerContributor; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.ui.Activator; +import org.simantics.sysdyn.ui.browser.nodes.ModelNode; + +public class ModelImager extends ImagerContributor { + + @Override + public ImageDescriptor getDescriptor(ReadGraph graph, ModelNode node) throws DatabaseException { + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/chart_organisation.png")); + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/OperatingInterfaces.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/OperatingInterfaces.java deleted file mode 100644 index a0394aeb..00000000 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/OperatingInterfaces.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.simantics.sysdyn.ui.browser.contributions; - -import java.util.Collection; - -import org.simantics.browsing.ui.graph.contributor.viewpoint.ViewpointContributor; -import org.simantics.db.ReadGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.sysdyn.ui.browser.nodes.AbstractNode; -import org.simantics.sysdyn.ui.browser.nodes.ModelNode; -import org.simantics.sysdyn.ui.browser.nodes.OperatingInterfacesFolder; -import org.simantics.utils.DataContainer; - -public class OperatingInterfaces extends ViewpointContributor { - - @Override - public Collection getContribution(ReadGraph graph, ModelNode model) throws DatabaseException { - return new DataContainer(new OperatingInterfacesFolder(model.resource)); - } - - @Override - public String getViewpointId() { - return "Standard"; - } - -} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableImager.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableImager.java new file mode 100644 index 00000000..3dc6c4cd --- /dev/null +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableImager.java @@ -0,0 +1,16 @@ +package org.simantics.sysdyn.ui.browser.contributions; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.simantics.browsing.ui.swt.ImagerContributor; +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.sysdyn.ui.Activator; +import org.simantics.sysdyn.ui.browser.nodes.VariableNode; + +public class VariableImager extends ImagerContributor { + + @Override + public ImageDescriptor getDescriptor(ReadGraph graph, VariableNode node) throws DatabaseException { + return ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getResource("icons/brick.png")); + } +} diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ConfigurationNode.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ConfigurationNode.java index 1bde861e..1f44cfd1 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ConfigurationNode.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/nodes/ConfigurationNode.java @@ -12,30 +12,12 @@ package org.simantics.sysdyn.ui.browser.nodes; import org.simantics.browsing.ui.common.node.IDeletable; -import org.simantics.browsing.ui.common.node.IModifiableNode; -import org.simantics.browsing.ui.content.Labeler.Modifier; -import org.simantics.browsing.ui.graph.impl.LabelModifier; import org.simantics.db.Resource; -import org.simantics.ui.SimanticsUI; -public class ConfigurationNode extends AbstractNode implements IDeletable, IModifiableNode { +public class ConfigurationNode extends AbstractNode implements IDeletable { public ConfigurationNode(Resource resource) { super(resource); } - @Override - public Modifier getModifier(String columnId) { - LabelModifier modifier = new LabelModifier(SimanticsUI.getSession(), resource) { - @Override - public String isValid(String label) { - if (label.isEmpty()) - return "Empty label not allowed"; - if (label.contains(" ")) - return "Spaces are not allowed"; - return null; - } - }; - return modifier; - } } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynDiagramEditor.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynDiagramEditor.java index 90ea71c3..1da86b7c 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynDiagramEditor.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/editor/SysdynDiagramEditor.java @@ -90,7 +90,6 @@ public class SysdynDiagramEditor extends ResourceEditorPart { for(IElement element : diagram.getElements()) element.addListener(elementUpdateListener); } catch (MappingException e) { - // TODO Auto-generated catch block e.printStackTrace(); } @@ -112,7 +111,6 @@ public class SysdynDiagramEditor extends ResourceEditorPart { } }); } catch (DatabaseException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } @@ -134,7 +132,6 @@ public class SysdynDiagramEditor extends ResourceEditorPart { } }); } catch (DatabaseException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } @@ -175,7 +172,17 @@ public class SysdynDiagramEditor extends ResourceEditorPart { }); SimanticsUI.getSession().asyncRequest( - new TitleRequest(site.getId(), getResourceInput()), + new TitleRequest(site.getId(), getResourceInput()) { + @Override + public String perform(ReadGraph graph) throws DatabaseException { + Resource r = graph.getSingleObject( + getResourceInput().getResource(), + graph.getBuiltins().IsConfigurationOf); + String n = null; + n = graph.adapt(r, String.class); + return n; + } + }, new TitleUpdater(site.getShell().getDisplay(), new Callback() { @Override public void run(String partName) { @@ -188,7 +195,6 @@ public class SysdynDiagramEditor extends ResourceEditorPart { } })); } catch (DatabaseException e) { - // TODO Auto-generated catch block e.printStackTrace(); } } -- 2.47.1