]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/src/org/simantics/modeling/adapters/ActiveExperiment.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / adapters / ActiveExperiment.java
index 187d56e49cba433877286cad4001d06c8c03a643..25082437920901f29d4ef3eff54a540c51686881 100644 (file)
@@ -1,51 +1,51 @@
-/*******************************************************************************\r
- * Copyright (c) 2012 Association for Decentralized Information Management in\r
- * 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
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.modeling.adapters;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.utils.Logger;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.request.PossibleActiveExperimentPath;\r
-import org.simantics.db.layer0.variable.Variable;\r
-import org.simantics.db.layer0.variable.Variables;\r
-import org.simantics.scl.runtime.function.FunctionImpl2;\r
-\r
-/**\r
- * f: (ReadGraph, Resource model) -> Variable activeExperiment\r
- * \r
- * @author Tuukka Lehtonen\r
- */\r
-public class ActiveExperiment extends FunctionImpl2<ReadGraph, Resource, Variable> {\r
-\r
-    @Override\r
-    public Variable apply(ReadGraph p0, Resource p1) {\r
-        try {\r
-            ReadGraph graph = (ReadGraph) p0;\r
-            Resource model = (Resource) p1;\r
-\r
-            String activeExperimentPath = graph.syncRequest(new PossibleActiveExperimentPath(model));\r
-            if (activeExperimentPath == null)\r
-                return null;\r
-\r
-            Variable var = Variables.getPossibleVariable(graph, model);\r
-            if (var == null)\r
-                return null;\r
-            Variable run = var.browsePossible(graph, activeExperimentPath);\r
-            return run;\r
-        } catch (DatabaseException e) {\r
-            Logger.defaultLogError(e);\r
-            return null;\r
-        }\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2012 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.modeling.adapters;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.utils.Logger;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.request.PossibleActiveExperimentPath;
+import org.simantics.db.layer0.variable.Variable;
+import org.simantics.db.layer0.variable.Variables;
+import org.simantics.scl.runtime.function.FunctionImpl2;
+
+/**
+ * f: (ReadGraph, Resource model) -> Variable activeExperiment
+ * 
+ * @author Tuukka Lehtonen
+ */
+public class ActiveExperiment extends FunctionImpl2<ReadGraph, Resource, Variable> {
+
+    @Override
+    public Variable apply(ReadGraph p0, Resource p1) {
+        try {
+            ReadGraph graph = (ReadGraph) p0;
+            Resource model = (Resource) p1;
+
+            String activeExperimentPath = graph.syncRequest(new PossibleActiveExperimentPath(model));
+            if (activeExperimentPath == null)
+                return null;
+
+            Variable var = Variables.getPossibleVariable(graph, model);
+            if (var == null)
+                return null;
+            Variable run = var.browsePossible(graph, activeExperimentPath);
+            return run;
+        } catch (DatabaseException e) {
+            Logger.defaultLogError(e);
+            return null;
+        }
+    }
+
+}