]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
You really shouldn't copy paste code
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 22 Jan 2009 15:28:17 +0000 (15:28 +0000)
committerluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 22 Jan 2009 15:28:17 +0000 (15:28 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8811 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProviderRegistry.java

index 6540cf52a483c93c5b13f718f57d948c3f12a474..2e65f9eb277b1930bb7db9a936425126adb6e608 100644 (file)
@@ -42,10 +42,10 @@ public class AppearanceProviderRegistry implements IExtensionChangeHandler {
     private ExtensionTracker tracker;\r
     \r
     private List<AppearanceProviderExtension> extensions = new ArrayList<AppearanceProviderExtension>();\r
-    private Map<Resource,AppearanceProvider> providers;\r
+    //private Map<Resource,AppearanceProvider> providers;\r
     \r
     private AppearanceProviderRegistry() {\r
-        providers = new HashMap<Resource,AppearanceProvider>();\r
+        //providers = new HashMap<Resource,AppearanceProvider>();\r
         \r
         tracker = new ExtensionTracker();\r
                \r
@@ -92,9 +92,9 @@ public class AppearanceProviderRegistry implements IExtensionChangeHandler {
                }\r
        }\r
     \r
-    private Map<Resource,AppearanceProvider> getProviderMap() {\r
-        return providers;\r
-    }\r
+//    private Map<Resource,AppearanceProvider> getProviderMap() {\r
+//        return providers;\r
+//    }\r
     \r
     public static Collection<RenderState> getAppearance(IEntity thing, Renderer renderer) {\r
        AppearanceProvider provider = getAppearanceProvider(thing);\r
@@ -102,24 +102,24 @@ public class AppearanceProviderRegistry implements IExtensionChangeHandler {
     }\r
     \r
     public static AppearanceProvider getAppearanceProvider(IEntity thing) {\r
-       Collection<IEntity> types = thing.getRelatedObjects(thing.getGraph().getBuiltins().InstanceOf);\r
+       //Collection<IEntity> types = thing.getRelatedObjects(thing.getGraph().getBuiltins().InstanceOf);\r
         \r
        //Resource types[] = OntologyUtils.getTypes(resource);\r
-       for (IEntity t : types) {\r
-               AppearanceProvider provider = getInstance().getProviderMap().get(t.getResource());\r
-               if (provider == null) {\r
+//     for (IEntity t : types) {\r
+               //AppearanceProvider provider = getInstance().getProviderMap().get(t.getResource());\r
+               //if (provider == null) {\r
                 //for (Extension<GeometryProvider> e : getInstance().getExtensions()) {\r
                        for (AppearanceProviderExtension e : getInstance().getExtensions()) {\r
                     if (e.provider.canHandle(thing)) {\r
-                        getInstance().getProviderMap().put(t.getResource(), e.provider);\r
+                        //getInstance().getProviderMap().put(t.getResource(), e.provider);\r
                         return e.provider;\r
                     }\r
                 }\r
                 \r
-            } else {\r
-               return provider;\r
-            }\r
-       }\r
+//            } else {\r
+//             return provider;\r
+//            }\r
+//     }\r
        \r
        return null;\r
     }\r