]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
INode cleanup
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 20 Sep 2011 16:19:41 +0000 (16:19 +0000)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 2 Feb 2017 09:22:16 +0000 (11:22 +0200)
git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@22349 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.interop/graph.tg
org.simantics.interop/graph/Interop.pgraph
org.simantics.interop/src/org/simantics/interop/browsing/INode.java
org.simantics.interop/src/org/simantics/interop/browsing/INodeEvaluators.java
org.simantics.interop/src/org/simantics/interop/browsing/ImportNode.java
org.simantics.interop/src/org/simantics/interop/browsing/ImportNode2.java

index 164cb48bf5d912fe7248650f2fcb4ca7d6843754..e4f909a43660bcc93c5cfe6e4d3539fe3df94757 100644 (file)
Binary files a/org.simantics.interop/graph.tg and b/org.simantics.interop/graph.tg differ
index 7ec5ad0f7dea53a647dfde3c44074469ea328ac3..ef6359ab16589dba4e8d5b506c866e0696fafa8d 100644 (file)
@@ -25,7 +25,7 @@ IBC = INTEROP.InteropBrowseContext : VP.BrowseContext
     VP.BrowseContext.IsIncludedIn MOD.ModelingBrowseContext\r
 \r
 INTEROP.INodeType <T VP.NodeType\r
-   @L0.assert VP.HasContentType "org.simantics.modeling.ui.modelBrowser.model.INode"\r
+   @L0.assert VP.HasContentType "org.simantics.interop.browsing.INode"\r
 \r
 IBC.InteropNode : INTEROP.INodeType\r
 IBC.InteropChildRule : VP.ChildRule\r
index fdb1800ce0c938b6ed297ace02bfd95202039ecd..473af201213066d461a61234f48b169c3734c624 100644 (file)
@@ -4,10 +4,7 @@ import java.util.Collection;
 \r
 import org.eclipse.core.runtime.IAdaptable;\r
 import org.eclipse.jface.resource.ImageDescriptor;\r
-import org.eclipse.jface.viewers.ISelection;\r
-import org.simantics.browsing.ui.content.Labeler.Modifier;\r
 import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Session;\r
 import org.simantics.db.exception.DatabaseException;\r
 \r
 public interface INode extends IAdaptable {\r
@@ -16,8 +13,6 @@ public interface INode extends IAdaptable {
     Collection<?> getChildren(ReadGraph graph) throws DatabaseException;\r
     boolean hasChildren(ReadGraph graph) throws DatabaseException;\r
     ImageDescriptor getImage(ReadGraph graph) throws DatabaseException;\r
-    void handleDrop(Session session, ISelection selection);\r
-    Modifier getModifier(Session session, String columnId);\r
 \r
 \r
 }\r
index e6216ed1fa6b5e111be9d808a347ba8a77974681..97c8e290eeb1ba2d1104d5fef98932f38eeef8c2 100644 (file)
@@ -6,16 +6,15 @@ import java.util.Map;
 \r
 import org.eclipse.jface.resource.ImageDescriptor;\r
 import org.simantics.browsing.ui.BuiltinKeys;\r
-import org.simantics.browsing.ui.DataSource;\r
-import org.simantics.browsing.ui.NodeContext;\r
-import org.simantics.browsing.ui.PrimitiveQueryUpdater;\r
 import org.simantics.browsing.ui.BuiltinKeys.ImagerKey;\r
 import org.simantics.browsing.ui.BuiltinKeys.LabelerKey;\r
 import org.simantics.browsing.ui.BuiltinKeys.ViewpointKey;\r
-import org.simantics.browsing.ui.GraphExplorer.ModificationContext;\r
+import org.simantics.browsing.ui.DataSource;\r
+import org.simantics.browsing.ui.NodeContext;\r
+import org.simantics.browsing.ui.PrimitiveQueryUpdater;\r
 import org.simantics.browsing.ui.common.ColumnKeys;\r
-import org.simantics.browsing.ui.common.EvaluatorImpl;\r
 import org.simantics.browsing.ui.common.EvaluatorData.Evaluator;\r
+import org.simantics.browsing.ui.common.EvaluatorImpl;\r
 import org.simantics.browsing.ui.common.comparators.AlphanumericComparatorFactory;\r
 import org.simantics.browsing.ui.common.imagers.ContainerImager;\r
 import org.simantics.browsing.ui.content.Imager;\r
@@ -32,7 +31,6 @@ import org.simantics.db.exception.DatabaseException;
 import org.simantics.modeling.ui.modelBrowser.model.IChildrenCallback;\r
 import org.simantics.modeling.ui.modelBrowser.model.IDisposable;\r
 import org.simantics.modeling.ui.modelBrowser.model.IUpdateable;\r
-import org.simantics.ui.SimanticsUI;\r
 import org.simantics.utils.datastructures.Callable;\r
 import org.simantics.utils.datastructures.Callback;\r
 \r
@@ -140,15 +138,15 @@ class NodeLabelerFactory implements LabelerFactory {
                         ((INode) context.getConstant(BuiltinKeys.INPUT)).getLabel(graph));\r
             }\r
 \r
-            @Override\r
-            public Modifier getModifier(ModificationContext sourcePart, String key) {\r
-                return ((INode) context.getConstant(BuiltinKeys.INPUT)).getModifier(SimanticsUI.getSession(), key);\r
-            }\r
-\r
-            @Override\r
-            public int category(ReadGraph graph) throws DatabaseException {\r
-                return ((INode) context.getConstant(BuiltinKeys.INPUT)).getCategory(graph);\r
-            }\r
+//            @Override\r
+//            public Modifier getModifier(ModificationContext sourcePart, String key) {\r
+//                return ((INode) context.getConstant(BuiltinKeys.INPUT)).getModifier(SimanticsUI.getSession(), key);\r
+//            }\r
+//\r
+//            @Override\r
+//            public int category(ReadGraph graph) throws DatabaseException {\r
+//                return ((INode) context.getConstant(BuiltinKeys.INPUT)).getCategory(graph);\r
+//            }\r
         };\r
     }\r
 }\r
index 386dbf5edcb6d2cd883b249f886369c128f9b163..18296c633a8db56d466365b9c88077171cf3bc3b 100644 (file)
@@ -5,11 +5,8 @@ import java.util.Collection;
 import java.util.List;\r
 \r
 import org.eclipse.jface.resource.ImageDescriptor;\r
-import org.eclipse.jface.viewers.ISelection;\r
-import org.simantics.browsing.ui.content.Labeler.Modifier;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
-import org.simantics.db.Session;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.interop.Activator;\r
 import org.simantics.interop.stubs.InteropResource;\r
@@ -27,12 +24,7 @@ public class ImportNode implements INode {
        public Object getAdapter(Class adapter) {\r
                return null;\r
        }\r
-       \r
-       @Override\r
-       public int getCategory(ReadGraph graph) throws DatabaseException {\r
-               return 0;\r
-       }\r
-       \r
+\r
        \r
        @Override\r
        public ImageDescriptor getImage(ReadGraph graph) throws DatabaseException {\r
@@ -43,17 +35,7 @@ public class ImportNode implements INode {
        public String getLabel(ReadGraph graph) throws DatabaseException {\r
                return "Imports";\r
        }\r
-       \r
-       @Override\r
-       public Modifier getModifier(Session session, String columnId) {\r
-               return null;\r
-       }\r
-       \r
-       \r
-       @Override\r
-       public void handleDrop(Session session, ISelection selection) {\r
-               \r
-       }\r
+\r
        \r
        @Override\r
        public boolean hasChildren(ReadGraph graph) throws DatabaseException {\r
@@ -76,5 +58,10 @@ public class ImportNode implements INode {
                \r
        }\r
        \r
+       @Override\r
+       public int getCategory(ReadGraph graph) throws DatabaseException {\r
+               return 0;\r
+       }\r
+       \r
 \r
 }\r
index e1f81d022ad243e8c5502a4ae2d87de96844193e..7d8655a325bf66563af15b6f0035e00b4e783930 100644 (file)
@@ -5,11 +5,8 @@ import java.util.Collection;
 import java.util.List;\r
 \r
 import org.eclipse.jface.resource.ImageDescriptor;\r
-import org.eclipse.jface.viewers.ISelection;\r
-import org.simantics.browsing.ui.content.Labeler.Modifier;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
-import org.simantics.db.Session;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.interop.Activator;\r
 import org.simantics.interop.stubs.InteropResource;\r
@@ -27,11 +24,7 @@ public class ImportNode2 implements INode {
        public Object getAdapter(Class adapter) {\r
                return null;\r
        }\r
-       \r
-       @Override\r
-       public int getCategory(ReadGraph graph) throws DatabaseException {\r
-               return 0;\r
-       }\r
+\r
        \r
        \r
        @Override\r
@@ -44,18 +37,6 @@ public class ImportNode2 implements INode {
                return "Imports";\r
        }\r
        \r
-       @Override\r
-       public Modifier getModifier(Session session, String columnId) {\r
-               return null;\r
-       }\r
-       \r
-\r
-       \r
-       @Override\r
-       public void handleDrop(Session session, ISelection selection) {\r
-               \r
-       }\r
-       \r
        @Override\r
        public boolean hasChildren(ReadGraph graph) throws DatabaseException {\r
                return getChildren(graph).size() > 0;\r
@@ -77,5 +58,10 @@ public class ImportNode2 implements INode {
 \r
        }\r
        \r
+       @Override\r
+       public int getCategory(ReadGraph graph) throws DatabaseException {\r
+               return 0;\r
+       }\r
+       \r
 \r
 }\r