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
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