]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Organized imports in SysdynBrowser to make it compile.
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 8 Mar 2010 13:51:52 +0000 (13:51 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 8 Mar 2010 13:51:52 +0000 (13:51 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@14667 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/SysdynBrowser.java

index 5ded8b862348a1ddb62a27b6371ff1755a3d428b..da8dfdd03b25d0e9014b9b753bc181ba6c0f609e 100644 (file)
@@ -10,17 +10,17 @@ import org.simantics.browsing.ui.NodeContext;
 import org.simantics.browsing.ui.PrimitiveQueryUpdater;\r
 import org.simantics.browsing.ui.BuiltinKeys.LabelerKey;\r
 import org.simantics.browsing.ui.common.ColumnKeys;\r
-import org.simantics.browsing.ui.common.ContextMenuInitializer;\r
 import org.simantics.browsing.ui.common.EvaluatorData;\r
 import org.simantics.browsing.ui.common.EvaluatorDataImpl;\r
 import org.simantics.browsing.ui.common.EvaluatorImpl;\r
-import org.simantics.browsing.ui.common.IContextMenuInitializer;\r
 import org.simantics.browsing.ui.common.EvaluatorData.Evaluator;\r
 import org.simantics.browsing.ui.content.Labeler;\r
 import org.simantics.browsing.ui.content.LabelerFactory;\r
 import org.simantics.browsing.ui.graph.GraphExplorerView;\r
-import org.simantics.browsing.ui.graph.GraphViewpointFactory;\r
-import org.simantics.browsing.ui.graph.LazyGraphLabeler;\r
+import org.simantics.browsing.ui.graph.impl.GraphViewpointFactory;\r
+import org.simantics.browsing.ui.graph.impl.LazyGraphLabeler;\r
+import org.simantics.browsing.ui.swt.ContextMenuInitializer;\r
+import org.simantics.browsing.ui.swt.IContextMenuInitializer;\r
 import org.simantics.db.Builtins;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
@@ -38,13 +38,13 @@ public class SysdynBrowser extends GraphExplorerView {
     protected IContextMenuInitializer getContextMenuInitializer() {\r
         return new ContextMenuInitializer("#OntologyExplorerPopup");\r
     }\r
-    \r
+\r
     @Override\r
     protected EvaluatorData createEvaluatorData(Session session) {\r
         HintContext factoryHints = new HintContext();\r
         //if (sessionContext != null)\r
         //factoryHints.setHint(IGraphExplorerHints.KEY_SESSION_CONTEXT, sessionContext);\r
-        \r
+\r
         EvaluatorData data = new EvaluatorDataImpl();\r
         data.addEvaluator(Resource.class, createResourceEvaluator(session, factoryHints));\r
         return data;\r
@@ -52,34 +52,34 @@ public class SysdynBrowser extends GraphExplorerView {
 \r
     private Evaluator createResourceEvaluator(Session session, HintContext factoryHints) {\r
         Evaluator evaluator = new EvaluatorImpl();\r
-        evaluator.addViewpoint(new GraphViewpointFactory() {            \r
+        evaluator.addViewpoint(new GraphViewpointFactory() {\r
             @Override\r
             protected Collection<?> getChildren(ReadGraph g, Resource r)\r
-                    throws DatabaseException {\r
+            throws DatabaseException {\r
                 Builtins b = g.getBuiltins();\r
                 SysdynResource sr = SysdynResource.getInstance(g);\r
-                ArrayList<Resource> result = new ArrayList<Resource>(); \r
+                ArrayList<Resource> result = new ArrayList<Resource>();\r
                 for(Resource c : g.getObjects(r, b.ConsistsOf)) {\r
-                    if(  g.isInstanceOf(c, sr.Configuration) \r
-                      || (g.isInstanceOf(c, sr.Variable) &&\r
-                          !g.isInstanceOf(c, sr.Cloud)\r
-                         )\r
-                       )\r
+                    if(  g.isInstanceOf(c, sr.Configuration)\r
+                            || (g.isInstanceOf(c, sr.Variable) &&\r
+                                    !g.isInstanceOf(c, sr.Cloud)\r
+                            )\r
+                    )\r
                         result.add(c);\r
                 }\r
                 return result;\r
             }\r
         }, 1.0);\r
-        evaluator.addLabeler(new LabelerFactory() {            \r
+        evaluator.addLabeler(new LabelerFactory() {\r
             @Override\r
             public Labeler create(PrimitiveQueryUpdater updater, final NodeContext context, LabelerKey key) {\r
                 return new LazyGraphLabeler(updater, context, key) {\r
-                    \r
+\r
                     Resource nameResource;\r
-                    \r
+\r
                     @Override\r
                     public Map<String, String> labels(ReadGraph g)\r
-                            throws DatabaseException {\r
+                    throws DatabaseException {\r
                         Builtins b = g.getBuiltins();\r
                         nameResource = b.HasName;\r
                         Resource el = (Resource) context.getConstant(BuiltinKeys.INPUT);\r
@@ -87,12 +87,12 @@ public class SysdynBrowser extends GraphExplorerView {
                         for(Resource r : g.getObjects(el, b.HasName))\r
                             sb.append(g.getValue(r));\r
                         sb.append(" : ");\r
-                        for(Resource t : g.getObjects(el, b.InstanceOf))                            \r
+                        for(Resource t : g.getObjects(el, b.InstanceOf))\r
                             for(Resource r : g.getObjects(t, b.HasName))\r
                                 sb.append(g.getValue(r));\r
                         return Collections.singletonMap(ColumnKeys.SINGLE, sb.toString());\r
                     }\r
-                    \r
+\r
                     @Override\r
                     public Modifier getModifier(String key) {\r
                         LabelModifier modifier = new LabelModifier(SimanticsUI.getSession(), (Resource) context.getConstant(BuiltinKeys.INPUT), nameResource) {\r
@@ -107,11 +107,11 @@ public class SysdynBrowser extends GraphExplorerView {
                         };\r
                         return modifier;\r
                     }\r
-                };                \r
-            }        \r
-            \r
+                };\r
+            }\r
+\r
         }, 1.0);\r
-        /*evaluator.addImager(new ImagerFactory() {            \r
+        /*evaluator.addImager(new ImagerFactory() {\r
             @Override\r
             public Imager create(PrimitiveQueryUpdater updater, INodeContext context) {\r
                 // TODO Auto-generated method stub\r
@@ -119,6 +119,6 @@ public class SysdynBrowser extends GraphExplorerView {
             }\r
         });*/\r
         return evaluator;\r
-    }    \r
+    }\r
 \r
 }\r