]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/viewpoint/VariableChildRule.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / viewpoint / VariableChildRule.java
index bfd5a85be133dbd3ff32372deaccfac9458519e3..df2f8447774fec839fd823ba4ae1a6c7c22d0545 100644 (file)
@@ -1,37 +1,37 @@
-package org.simantics.modeling.ui.viewpoint;\r
-\r
-import java.util.Collection;\r
-import java.util.Collections;\r
-\r
-import org.simantics.browsing.ui.model.children.ChildRule;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.variable.Variable;\r
-import org.simantics.structural.stubs.StructuralResource2;\r
-\r
-public class VariableChildRule implements ChildRule {\r
-\r
-    @Override\r
-    public boolean isCompatible(Class<?> contentType) {\r
-        return contentType.equals(Variable.class);\r
-    }\r
-\r
-    @Override\r
-    public Collection<?> getChildren(ReadGraph graph, Object parent)\r
-            throws DatabaseException {\r
-        Collection<Variable> children = ((Variable)parent).getChildren(graph);\r
-        return VariableChildren.filterByClassification(graph, children, StructuralResource2.URIs.Component);\r
-    }\r
-\r
-    @Override\r
-    public Collection<?> getParents(ReadGraph graph, Object child)\r
-            throws DatabaseException {\r
-        Variable parent = ((Variable)child).getParent(graph);\r
-        if(parent == null)\r
-            return Collections.emptyList();\r
-        else\r
-            return Collections.singleton(parent);\r
-    }\r
-\r
-\r
-}\r
+package org.simantics.modeling.ui.viewpoint;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.simantics.browsing.ui.model.children.ChildRule;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.variable.Variable;
+import org.simantics.structural.stubs.StructuralResource2;
+
+public class VariableChildRule implements ChildRule {
+
+    @Override
+    public boolean isCompatible(Class<?> contentType) {
+        return contentType.equals(Variable.class);
+    }
+
+    @Override
+    public Collection<?> getChildren(ReadGraph graph, Object parent)
+            throws DatabaseException {
+        Collection<Variable> children = ((Variable)parent).getChildren(graph);
+        return VariableChildren.filterByClassification(graph, children, StructuralResource2.URIs.Component);
+    }
+
+    @Override
+    public Collection<?> getParents(ReadGraph graph, Object child)
+            throws DatabaseException {
+        Variable parent = ((Variable)child).getParent(graph);
+        if(parent == null)
+            return Collections.emptyList();
+        else
+            return Collections.singleton(parent);
+    }
+
+
+}