]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.structural2/src/org/simantics/structural2/scl/FindPossibleComponentTypeRequest.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.structural2 / src / org / simantics / structural2 / scl / FindPossibleComponentTypeRequest.java
index 9457632cf561da038142ec20f295e435fa4e98e5..0ed83a6c313052cd6b67b22a2b2009ddc266c80b 100644 (file)
@@ -1,31 +1,31 @@
-package org.simantics.structural2.scl;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.request.ResourceRead;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.layer0.Layer0;\r
-import org.simantics.structural.stubs.StructuralResource2;\r
-\r
-public class FindPossibleComponentTypeRequest extends ResourceRead<Resource> {\r
-\r
-       public FindPossibleComponentTypeRequest(Resource resource) {\r
-               super(resource);\r
-       }\r
-\r
-       @Override\r
-       public Resource perform(ReadGraph graph) throws DatabaseException {             \r
-               StructuralResource2 STR = StructuralResource2.getInstance(graph);               \r
-               Resource type = graph.getPossibleObject(resource, STR.Defines);\r
-               if(type != null)\r
-                       return type;            \r
-\r
-               Layer0 L0 = Layer0.getInstance(graph);\r
-               Resource parent = graph.getPossibleObject(resource, L0.PartOf);\r
-               if(parent != null && graph.isInstanceOf(parent, STR.Composite))\r
-                       return graph.syncRequest(new FindPossibleComponentTypeRequest(parent));\r
-               else\r
-                       return null;\r
-       }\r
-\r
-}\r
+package org.simantics.structural2.scl;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.ResourceRead;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.layer0.Layer0;
+import org.simantics.structural.stubs.StructuralResource2;
+
+public class FindPossibleComponentTypeRequest extends ResourceRead<Resource> {
+
+       public FindPossibleComponentTypeRequest(Resource resource) {
+               super(resource);
+       }
+
+       @Override
+       public Resource perform(ReadGraph graph) throws DatabaseException {             
+               StructuralResource2 STR = StructuralResource2.getInstance(graph);               
+               Resource type = graph.getPossibleObject(resource, STR.Defines);
+               if(type != null)
+                       return type;            
+
+               Layer0 L0 = Layer0.getInstance(graph);
+               Resource parent = graph.getPossibleObject(resource, L0.PartOf);
+               if(parent != null && graph.isInstanceOf(parent, STR.Composite))
+                       return graph.syncRequest(new FindPossibleComponentTypeRequest(parent));
+               else
+                       return null;
+       }
+
+}