- File L0GraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.layer0").getEntry("/graph.tg")), "L0_graph.tg");\r
- File L0XGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.layer0x.ontology").getEntry("/graph.tg")), "L0X_graph.tg");\r
- File DiagramGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.diagram.ontology").getEntry("/graph.tg")), "DIA_graph.tg");\r
- File G2DGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.g2d.ontology").getEntry("/graph.tg")), "G2D_graph.tg");\r
- File StructuralGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.structural.ontology").getEntry("/graph.tg")), "ST_graph.tg");\r
- File ModelingGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.modeling.ontology").getEntry("/graph.tg")), "MOD_graph.tg");\r
- File SimulationGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.simulation.ontology").getEntry("/graph.tg")), "SIMU_graph.tg");\r
- File DocumentGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.document.ontology").getEntry("/graph.tg")), "DOC_graph.tg");\r
- File SpreadsheetGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.spreadsheet.ontology").getEntry("/graph.tg")), "SHEET_graph.tg");\r
- File ProjectGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.project.ontology").getEntry("/graph.tg")), "PROJ_graph.tg");\r
- File SelectionViewGraphFile = url2file(FileLocator.resolve(Platform.getBundle("org.simantics.selectionview.ontology").getEntry("/graph.tg")), "SEL_graph.tg");\r
- \r
- dependencies.add(GraphCompiler.read(L0GraphFile));\r
- dependencies.add(GraphCompiler.read(L0XGraphFile));\r
- dependencies.add(GraphCompiler.read(DiagramGraphFile));\r
- dependencies.add(GraphCompiler.read(G2DGraphFile));\r
- dependencies.add(GraphCompiler.read(StructuralGraphFile));\r
- dependencies.add(GraphCompiler.read(ModelingGraphFile));\r
- dependencies.add(GraphCompiler.read(SimulationGraphFile));\r
- dependencies.add(GraphCompiler.read(DocumentGraphFile));\r
- dependencies.add(GraphCompiler.read(SpreadsheetGraphFile));\r
- dependencies.add(GraphCompiler.read(ProjectGraphFile));\r
- dependencies.add(GraphCompiler.read(SelectionViewGraphFile));\r
+ for(Bundle b : Activator.getContext().getBundles()) {\r
+ URL tg = b.getEntry("/graph.tg");\r
+ if(tg == null) continue;\r
+ File f = url2file(FileLocator.resolve(tg), b.getSymbolicName());\r
+ dependencies.add(GraphCompiler.read(f));\r
+ }\r