]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewSymbol.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / actions / NewSymbol.java
index 9a7789690728223b879635fead5669ebb9c632d5..dfd9b3feb130f799e19c4658b8f312289a1473b8 100644 (file)
@@ -1,40 +1,40 @@
-package org.simantics.modeling.ui.actions;\r
-\r
-import org.simantics.Simantics;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.WriteGraph;\r
-import org.simantics.db.common.request.WriteRequest;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.adapter.ActionFactory;\r
-import org.simantics.modeling.userComponent.ComponentTypeCommands;\r
-import org.simantics.utils.ui.ErrorLogger;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class NewSymbol implements ActionFactory {\r
-\r
-    @Override\r
-    public Runnable create(Object target) {\r
-        if (!(target instanceof Resource))\r
-            return null;\r
-        final Resource componentType = (Resource) target;\r
-        return new Runnable() {\r
-            @Override\r
-            public void run() {\r
-                try {\r
-                    Simantics.getSession().syncRequest(new WriteRequest() {\r
-                        @Override\r
-                        public void perform(WriteGraph graph) throws DatabaseException {\r
-                            graph.markUndoPoint();\r
-                            ComponentTypeCommands.createSymbol(graph, componentType);\r
-                        }\r
-                    });\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.WriteGraph;
+import org.simantics.db.common.request.WriteRequest;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.adapter.ActionFactory;
+import org.simantics.modeling.userComponent.ComponentTypeCommands;
+import org.simantics.utils.ui.ErrorLogger;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class NewSymbol implements ActionFactory {
+
+    @Override
+    public Runnable create(Object target) {
+        if (!(target instanceof Resource))
+            return null;
+        final Resource componentType = (Resource) target;
+        return new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    Simantics.getSession().syncRequest(new WriteRequest() {
+                        @Override
+                        public void perform(WriteGraph graph) throws DatabaseException {
+                            graph.markUndoPoint();
+                            ComponentTypeCommands.createSymbol(graph, componentType);
+                        }
+                    });
+                } catch (DatabaseException e) {
+                    ErrorLogger.defaultLogError(e);
+                }
+            }
+        };
+    }
+
+}