From: luukkainen Date: Thu, 26 Sep 2013 14:42:28 +0000 (+0000) Subject: Search functions are contributed with ontologies. X-Git-Tag: 1.8.1~242 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=4d53afccd4752480e4a6eda21538d3535e5ff9a7;p=simantics%2Fsysdyn.git Search functions are contributed with ontologies. refs #4447 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@27893 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ontology/META-INF/MANIFEST.MF b/org.simantics.sysdyn.ontology/META-INF/MANIFEST.MF index f4ca250c..dfa33be9 100644 --- a/org.simantics.sysdyn.ontology/META-INF/MANIFEST.MF +++ b/org.simantics.sysdyn.ontology/META-INF/MANIFEST.MF @@ -18,7 +18,8 @@ Require-Bundle: org.simantics.layer0, org.simantics.color.ontology;bundle-version="1.0.0", org.simantics.simulation.ontology;bundle-version="1.0.0", org.simantics.silk.ontology;bundle-version="1.0.0", - org.simantics.spreadsheet.ontology;bundle-version="1.1.0" + org.simantics.spreadsheet.ontology;bundle-version="1.1.0", + org.simantics.workbench.ontology;bundle-version="1.2.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: org.simantics.sysdyn Bundle-Vendor: VTT Technical Reserarch Centre of Finland diff --git a/org.simantics.sysdyn.ontology/graph.tg b/org.simantics.sysdyn.ontology/graph.tg index 93d42bb8..0ee27c2d 100644 Binary files a/org.simantics.sysdyn.ontology/graph.tg and b/org.simantics.sysdyn.ontology/graph.tg differ diff --git a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph index 12cf9621..f180d4f1 100644 --- a/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph +++ b/org.simantics.sysdyn.ontology/graph/Sysdyn.pgraph @@ -8,6 +8,7 @@ MOD = PROJ = JFREE = SHEET = +WORKBENCH = //##################################################################### // Defines ontology and attaches it to SimanticsDomain @@ -87,6 +88,9 @@ SYSDYN.DefaultRealization requiredActivations = new HashSet(); //requiredActivations.add(APROS.IndexActivation); - session.syncRequest(new WriteRequest(support.getWorkspacePersistent("activations")) { - @Override - public void perform(WriteGraph graph) throws DatabaseException { - - final SysdynResource SR = SysdynResource.getInstance(graph); - - //for (Resource activation : graph.getObjects(project.get(), L0X.HasActivation)) - // requiredActivations.remove(activation); - //for (Resource requiredActivation : requiredActivations) - // if (requiredActivation != null) - // graph.claim(project.get(), L0X.HasActivation, null, requiredActivation); - - // Initialize Modules function as workbench search function. - graph.syncRequest(new WriteRequest(support.getWorkspacePersistent("preferences")) { - @Override - public void perform(WriteGraph graph) throws DatabaseException { - WorkbenchResource WB = WorkbenchResource.getInstance(graph); - graph.deny(project.get(), WB.HasWorkbenchSearchFunction); - graph.claim(project.get(), WB.HasWorkbenchSearchFunction, SR.ModulesSearchFunction); - } - }); - } - }); + } catch (DatabaseException e) {