]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.annotation.ui/src/org/simantics/annotation/ui/actions/NewAnnotationType.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.annotation.ui / src / org / simantics / annotation / ui / actions / NewAnnotationType.java
index 245c6f28092e2b88f4d4082670acec1a001c9dd9..f2ea61e9295e26748d37d687105cab13b55bd8c0 100644 (file)
@@ -1,44 +1,44 @@
-/*******************************************************************************\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.annotation.ui.actions;\r
-\r
-import org.simantics.Simantics;\r
-import org.simantics.annotation.ui.AnnotationUtils;\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
-\r
-public class NewAnnotationType 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
-                Simantics.getSession().asyncRequest(new WriteRequest() {\r
-                    @Override\r
-                    public void perform(WriteGraph g) throws DatabaseException {\r
-                        g.markUndoPoint();\r
-                        AnnotationUtils.newAnnotationType(g, parent);\r
-                    }\r
-                });\r
-            }\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.annotation.ui.actions;
+
+import org.simantics.Simantics;
+import org.simantics.annotation.ui.AnnotationUtils;
+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;
+
+public class NewAnnotationType 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() {
+                Simantics.getSession().asyncRequest(new WriteRequest() {
+                    @Override
+                    public void perform(WriteGraph g) throws DatabaseException {
+                        g.markUndoPoint();
+                        AnnotationUtils.newAnnotationType(g, parent);
+                    }
+                });
+            }
+        };
+    }
+
+}