X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.modeling.ui%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2Fui%2FSCLDiagramTemplate.java;h=b6cdcae225fcf2c2486e11fce4ecd27739b692bc;hp=387a20b0c99208554304691bb2e09f18f48d5fd7;hb=0475b9e2a9331ef8f3dcd61567e5d071ae8ef561;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/SCLDiagramTemplate.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/SCLDiagramTemplate.java index 387a20b0c..b6cdcae22 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/SCLDiagramTemplate.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/SCLDiagramTemplate.java @@ -1,26 +1,26 @@ -package org.simantics.modeling.ui; - -import org.simantics.db.ReadGraph; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.layer0.variable.Variable; -import org.simantics.diagram.function.PredefinedVariables; -import org.simantics.scenegraph.loader.ScenegraphLoaderUtils; - -public class SCLDiagramTemplate { - - public static Variable templateDiagram(ReadGraph graph, Variable self) throws DatabaseException { - Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self); - return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "diagram"); - } - - public static Variable templateComposite(ReadGraph graph, Variable self) throws DatabaseException { - Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self); - return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "diagramComposite"); - } - - public static Variable templateModel(ReadGraph graph, Variable self) throws DatabaseException { - Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self); - return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "model"); - } - +package org.simantics.modeling.ui; + +import org.simantics.db.ReadGraph; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.variable.Variable; +import org.simantics.diagram.function.PredefinedVariables; +import org.simantics.scenegraph.loader.ScenegraphLoaderUtils; + +public class SCLDiagramTemplate { + + public static Variable templateDiagram(ReadGraph graph, Variable self) throws DatabaseException { + Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self); + return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "diagram"); //$NON-NLS-1$ + } + + public static Variable templateComposite(ReadGraph graph, Variable self) throws DatabaseException { + Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self); + return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "diagramComposite"); //$NON-NLS-1$ + } + + public static Variable templateModel(ReadGraph graph, Variable self) throws DatabaseException { + Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self); + return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "model"); //$NON-NLS-1$ + } + } \ No newline at end of file