]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/runtime/RuntimeVariableForInput.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / runtime / RuntimeVariableForInput.java
index 56d6c4e21c855bfc61f62fcdc66326449b7314e0..ca3c73d3295e793a6e9d2529d1d96d03856c0e7e 100644 (file)
@@ -1,52 +1,52 @@
-/*******************************************************************************\r
- * Copyright (c) 2013 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     Semantum Oy - initial API and implementation for issue #4384\r
- *******************************************************************************/\r
-package org.simantics.diagram.runtime;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.request.UnaryRead;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.variable.RVI;\r
-import org.simantics.ui.workbench.IResourceEditorInput2;\r
-\r
-/**\r
- * Extract a triple <Model URI, Variable URI, RVI> from the input argument. This\r
- * request is needed in addition to {@link RuntimeVariable} to support possible\r
- * changes in the data contained by {@link IResourceEditorInput2}.\r
- * \r
- * Returns <code>null</code> if it cannot find:\r
- * <ol>\r
- * <li>model resource by its URI</li>\r
- * <li>active realization of the model or base realization as a fallback</li>\r
- * </ol>\r
- * \r
- * @author Tuukka Lehtonen\r
- * @see RuntimeVariable\r
- */\r
-class RuntimeVariableForInput extends UnaryRead<IResourceEditorInput2, RuntimeDiagramDesc> {\r
-\r
-    public RuntimeVariableForInput(IResourceEditorInput2 input) {\r
-        super(input);\r
-    }\r
-\r
-    @Override\r
-    public RuntimeDiagramDesc perform(ReadGraph graph) throws DatabaseException {\r
-        Resource model = parameter.getModel(graph);\r
-        String rvis = parameter.getRVI();\r
-        RVI rvi = rvis == null ? null : RVI.fromResourceFormat(graph, rvis);\r
-        return graph.syncRequest(new RuntimeVariable(\r
-                model,\r
-                rvi,\r
-                parameter.getResource()));\r
-    }\r
-\r
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ *     Semantum Oy - initial API and implementation for issue #4384
+ *******************************************************************************/
+package org.simantics.diagram.runtime;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.UnaryRead;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.variable.RVI;
+import org.simantics.ui.workbench.IResourceEditorInput2;
+
+/**
+ * Extract a triple <Model URI, Variable URI, RVI> from the input argument. This
+ * request is needed in addition to {@link RuntimeVariable} to support possible
+ * changes in the data contained by {@link IResourceEditorInput2}.
+ * 
+ * Returns <code>null</code> if it cannot find:
+ * <ol>
+ * <li>model resource by its URI</li>
+ * <li>active realization of the model or base realization as a fallback</li>
+ * </ol>
+ * 
+ * @author Tuukka Lehtonen
+ * @see RuntimeVariable
+ */
+class RuntimeVariableForInput extends UnaryRead<IResourceEditorInput2, RuntimeDiagramDesc> {
+
+    public RuntimeVariableForInput(IResourceEditorInput2 input) {
+        super(input);
+    }
+
+    @Override
+    public RuntimeDiagramDesc perform(ReadGraph graph) throws DatabaseException {
+        Resource model = parameter.getModel(graph);
+        String rvis = parameter.getRVI();
+        RVI rvi = rvis == null ? null : RVI.fromResourceFormat(graph, rvis);
+        return graph.syncRequest(new RuntimeVariable(
+                model,
+                rvi,
+                parameter.getResource()));
+    }
+
 }
\ No newline at end of file