]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8536 ac1ea38d...
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 8 Jan 2009 14:57:16 +0000 (14:57 +0000)
committerluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 8 Jan 2009 14:57:16 +0000 (14:57 +0000)
org.simantics.proconf.processeditor/META-INF/MANIFEST.MF
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/LibraryComponentDialog.java

index c70a17ee619a7f0b7280edff447a1bf9a88ce3d4..132bac2ce2eadc55fa4b40431f59dcd04e643140 100644 (file)
@@ -24,4 +24,5 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.ui.views,
  org.simantics.animation
 Eclipse-LazyStart: true
-Export-Package: org.simantics.processeditor.tools
+Export-Package: org.simantics.processeditor.stubs,
+ org.simantics.processeditor.tools
index f6b9473c5c58bb25e61deaf5af658e1958616404..63961a9881902f3bc68c0d0067a7c9ace263ff1c 100644 (file)
@@ -132,6 +132,25 @@ public class LibraryComponentDialog extends Dialog{
                Resource projectResource = ProConfUI.getProject().getResource();\r
                Stack<Resource> handling = new Stack<Resource>();\r
                handling.push(projectResource);\r
+               \r
+               // this is just a hack to get equipment defined in ontologies\r
+               Resource projectsLib = g.getObjects(projectResource, g.getBuiltins().PartOf).iterator().next();\r
+               Collection<Resource> projects = g.getObjects(projectsLib, g.getBuiltins().ConsistsOf);\r
+               Resource typeSystemProject = null;\r
+               for (Resource project : projects) {\r
+                       IEntity ent = EntityFactory.create(g,project);\r
+                       String name = ent.getName();\r
+                       if(name.equals("Type System Project")) {\r
+                               typeSystemProject = project;\r
+                               break;\r
+                       }\r
+               }\r
+               Collection<Resource> ontologies = g.getObjects(typeSystemProject, g.getBuiltins().ConsistsOf);\r
+               for (Resource ontology : ontologies) {\r
+                       if(g.isInstanceOf(ontology, g.getBuiltins().Ontology))\r
+                               handling.add(ontology);\r
+               }\r
+               \r
                while (!handling.isEmpty()) {\r
                        final Resource node = handling.pop();\r
                        if (g.isInstanceOf(node,primaryType)) {\r