import org.simantics.sysdyn.ui.editor.SysdynEditorInput;\r
import org.simantics.ui.DoubleClickEvent;\r
import org.simantics.ui.IDoubleClickAction;\r
-import org.simantics.ui.utils.AdaptionUtils;\r
import org.simantics.ui.workbench.ResourceEditorInput2;\r
+import org.simantics.utils.ui.AdaptionUtils;\r
import org.simantics.utils.ui.ISelectionUtils;\r
import org.simantics.utils.ui.action.PriorityAction;\r
import org.simantics.utils.ui.workbench.WorkbenchUtils;\r
// Open instance for a module instance, if the resource is adaptable to variable\r
Variable variable = AdaptionUtils.adaptToSingle(e.getResource(), Variable.class);\r
if(variable != null) {\r
- String rvi = Variables.getRVI(g, variable);\r
- if(!rvi.isEmpty())\r
- rvi = rvi.substring(1);\r
- Resource model = Variables.getModel(g, variable);\r
- Resource represents = (Resource)variable.getPropertyValue(g, Variables.REPRESENTS);\r
+ Resource represents = variable.getRepresents(g);\r
Resource instanceOf = g.getPossibleObject(represents, l0.InstanceOf);\r
Resource configuration = g.getPossibleObject(instanceOf, sr2.IsDefinedBy);\r
if(configuration != null) {\r
+ String rvi = Variables.getRVI(g, variable);\r
+ if(!rvi.isEmpty())\r
+ rvi = rvi.substring(1);\r
+ Resource model = Variables.getModel(g, variable);\r
addShowModuleAction(e, getResourceEditorInput(g, model, configuration, rvi));\r
return;\r
}\r
Layer0X L0X = Layer0X.getInstance(g);\r
\r
try {\r
- String proposition = URIStringUtils.escape(ComponentNamingUtil.findFreshInstanceName(g, project, configurationRoot, configuration, componentType));\r
+ String proposition = URIStringUtils.escape(ComponentNamingUtil.findFreshInstanceName(g, project, configuration, configuration, componentType));\r
Resource result = GraphUtils.create(g,\r
l0.HasName, proposition\r
);\r