]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewSCLQuery.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / actions / NewSCLQuery.java
index 11c77d3fb1d18291fa551def77e82275dd245922..a2379c2a594e7cf51b853a140f518020bf933575 100644 (file)
@@ -1,37 +1,37 @@
-package org.simantics.modeling.ui.actions;\r
-\r
-import org.simantics.Simantics;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.request.PossibleIndexRoot;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.adapter.ActionFactory;\r
-import org.simantics.modeling.ui.ModelingUIUtils;\r
-import org.simantics.utils.ui.ErrorLogger;\r
-\r
-/**\r
- * @author Antti Villberg\r
- */\r
-public class NewSCLQuery implements ActionFactory {\r
-\r
-    @Override\r
-    public Runnable create(Object target) {\r
-        if(!(target instanceof Resource))\r
-            return null;\r
-        final Resource parent = (Resource)target;\r
-\r
-        return new Runnable() {\r
-            @Override\r
-            public void run() {\r
-                try {\r
-                    Resource indexRoot = Simantics.getSession().syncRequest(new PossibleIndexRoot(parent));\r
-                    if(indexRoot == null) return;\r
-                    Simantics.getSession().markUndoPoint();\r
-                    ModelingUIUtils.newSCLQuery(parent, indexRoot);\r
-                } catch (DatabaseException e) {\r
-                    ErrorLogger.defaultLogError(e);\r
-                }\r
-            }\r
-        };\r
-    }\r
-\r
-}\r
+package org.simantics.modeling.ui.actions;
+
+import org.simantics.Simantics;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.PossibleIndexRoot;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.adapter.ActionFactory;
+import org.simantics.modeling.ui.ModelingUIUtils;
+import org.simantics.utils.ui.ErrorLogger;
+
+/**
+ * @author Antti Villberg
+ */
+public class NewSCLQuery implements ActionFactory {
+
+    @Override
+    public Runnable create(Object target) {
+        if(!(target instanceof Resource))
+            return null;
+        final Resource parent = (Resource)target;
+
+        return new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    Resource indexRoot = Simantics.getSession().syncRequest(new PossibleIndexRoot(parent));
+                    if(indexRoot == null) return;
+                    Simantics.getSession().markUndoPoint();
+                    ModelingUIUtils.newSCLQuery(parent, indexRoot);
+                } catch (DatabaseException e) {
+                    ErrorLogger.defaultLogError(e);
+                }
+            }
+        };
+    }
+
+}