From: luukkainen Date: Thu, 22 Jan 2009 15:28:17 +0000 (+0000) Subject: You really shouldn't copy paste code X-Git-Tag: simantics-1.19.0~20^2~6 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=b553dad9a38b0fa9a91926f3a4ff89b9cb8efa91;p=simantics%2F3d.git You really shouldn't copy paste code git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8811 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProviderRegistry.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProviderRegistry.java index 6540cf52..2e65f9eb 100644 --- a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProviderRegistry.java +++ b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/AppearanceProviderRegistry.java @@ -42,10 +42,10 @@ public class AppearanceProviderRegistry implements IExtensionChangeHandler { private ExtensionTracker tracker; private List extensions = new ArrayList(); - private Map providers; + //private Map providers; private AppearanceProviderRegistry() { - providers = new HashMap(); + //providers = new HashMap(); tracker = new ExtensionTracker(); @@ -92,9 +92,9 @@ public class AppearanceProviderRegistry implements IExtensionChangeHandler { } } - private Map getProviderMap() { - return providers; - } +// private Map getProviderMap() { +// return providers; +// } public static Collection getAppearance(IEntity thing, Renderer renderer) { AppearanceProvider provider = getAppearanceProvider(thing); @@ -102,24 +102,24 @@ public class AppearanceProviderRegistry implements IExtensionChangeHandler { } public static AppearanceProvider getAppearanceProvider(IEntity thing) { - Collection types = thing.getRelatedObjects(thing.getGraph().getBuiltins().InstanceOf); + //Collection types = thing.getRelatedObjects(thing.getGraph().getBuiltins().InstanceOf); //Resource types[] = OntologyUtils.getTypes(resource); - for (IEntity t : types) { - AppearanceProvider provider = getInstance().getProviderMap().get(t.getResource()); - if (provider == null) { +// for (IEntity t : types) { + //AppearanceProvider provider = getInstance().getProviderMap().get(t.getResource()); + //if (provider == null) { //for (Extension e : getInstance().getExtensions()) { for (AppearanceProviderExtension e : getInstance().getExtensions()) { if (e.provider.canHandle(thing)) { - getInstance().getProviderMap().put(t.getResource(), e.provider); + //getInstance().getProviderMap().put(t.getResource(), e.provider); return e.provider; } } - } else { - return provider; - } - } +// } else { +// return provider; +// } +// } return null; }