]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@17993 ac1ea38d-2e2b...
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 17 Sep 2010 08:36:57 +0000 (08:36 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 17 Sep 2010 08:36:57 +0000 (08:36 +0000)
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Modules.java

index 769968a72f430228b0c64df2cfc4ea159709a096..e73c697e02a159df0ac57d03487b7f763ec6ef8a 100644 (file)
@@ -12,6 +12,7 @@ import org.simantics.db.exception.DatabaseException;
 import org.simantics.layer0.Layer0;\r
 import org.simantics.modeling.ModelingResources;\r
 import org.simantics.structural.stubs.StructuralResource2;\r
+import org.simantics.sysdyn.SysdynResource;\r
 import org.simantics.sysdyn.ui.browser.nodes.ModuleTypeNode;\r
 import org.simantics.sysdyn.ui.browser.nodes.ModulesNode;\r
 \r
@@ -25,8 +26,10 @@ public class Modules extends ViewpointContributor<ModulesNode> {
         Layer0 l0 = Layer0.getInstance(graph);\r
         StructuralResource2 st = StructuralResource2.getInstance(graph);\r
         for(Resource r : graph.syncRequest(new ObjectsWithType(model.data, l0.ConsistsOf, st.ComponentType))) {\r
-            Resource symbol = graph.getPossibleObject(r,ModelingResources.getInstance(graph).ComponentTypeToSymbol);\r
-            result.add(new ModuleTypeNode(symbol));\r
+               if(graph.isInheritedFrom(r, SysdynResource.getInstance(graph).Module)) {\r
+                       Resource symbol = graph.getPossibleObject(r,ModelingResources.getInstance(graph).ComponentTypeToSymbol);\r
+                       result.add(new ModuleTypeNode(symbol));\r
+               }\r
         }\r
         return result;\r
 \r