From 78fbfb0c1c7cd63506f6ab8d747c96a846f444ab Mon Sep 17 00:00:00 2001 From: villberg Date: Tue, 9 Sep 2014 05:08:08 +0000 Subject: [PATCH] Show other models (workroom) also in sysdyn browser refs #5280 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30235 ac1ea38d-2e2b-0410-8846-a27921b304fc --- org.simantics.sysdyn.ui/adapters.xml | 2 +- .../sysdyn/ui/browser/contributions/Project.java | 8 ++++---- .../sysdyn/ui/browser/contributions/SysdynProject.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/org.simantics.sysdyn.ui/adapters.xml b/org.simantics.sysdyn.ui/adapters.xml index 517bc7e2..26ca56a7 100644 --- a/org.simantics.sysdyn.ui/adapters.xml +++ b/org.simantics.sysdyn.ui/adapters.xml @@ -10,5 +10,5 @@ VTT Technical Research Centre of Finland - initial API and implementation --> - none 0 fill 1 + none 0 fill 1 \ No newline at end of file diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Project.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Project.java index 0d381be5..06105db3 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Project.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/Project.java @@ -24,7 +24,7 @@ import org.simantics.db.common.request.ObjectsWithType; import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.Layer0; import org.simantics.project.ontology.ProjectResource; -import org.simantics.sysdyn.SysdynResource; +import org.simantics.simulation.ontology.SimulationResource; import org.simantics.sysdyn.ui.browser.nodes.SharedOntologyNode; public class Project extends ViewpointContributor { @@ -36,8 +36,8 @@ public class Project extends ViewpointContributor { ArrayList> result = new ArrayList>(); Layer0 l0 = Layer0.getInstance(graph); - SysdynResource sr = SysdynResource.getInstance(graph); - for(Resource r : graph.syncRequest(new ObjectsWithType(project, l0.ConsistsOf, sr.SysdynModel))) { + SimulationResource SIMU = SimulationResource.getInstance(graph); + for(Resource r : graph.syncRequest(new ObjectsWithType(project, l0.ConsistsOf, SIMU.Model))) { try { result.add(graph.adapt(r, AbstractNode.class)); } catch(DatabaseException e) { @@ -49,7 +49,7 @@ public class Project extends ViewpointContributor { if(!graph.isInstanceOf(project, PROJ.Project)) return Collections.emptyList(); Collection ontologies = Simantics.applySCL("Simantics/SharedOntologies", "traverseSharedOntologies", graph, graph.getRootLibrary()); for(Resource o : ontologies) { - if(!graph.isImmutable(o)) +// if(!graph.isImmutable(o)) result.add(new SharedOntologyNode(o)); } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/SysdynProject.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/SysdynProject.java index 91c46b6a..ce71ad29 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/SysdynProject.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/SysdynProject.java @@ -9,8 +9,8 @@ import org.simantics.db.Resource; import org.simantics.db.common.request.ObjectsWithType; import org.simantics.db.exception.DatabaseException; import org.simantics.layer0.Layer0; +import org.simantics.simulation.ontology.SimulationResource; import org.simantics.structural.ui.modelBrowser.nodes.AbstractNode; -import org.simantics.sysdyn.SysdynResource; public class SysdynProject extends ViewpointContributor { @@ -20,7 +20,7 @@ public class SysdynProject extends ViewpointContributor { ArrayList result = new ArrayList(); Layer0 L0 = Layer0.getInstance(graph); - for(Resource r : graph.syncRequest(new ObjectsWithType(project, L0.ConsistsOf, SysdynResource.getInstance(graph).SysdynModel))) { + for(Resource r : graph.syncRequest(new ObjectsWithType(project, L0.ConsistsOf, SimulationResource.getInstance(graph).Model))) { try { result.add(graph.adapt(r, AbstractNode.class)); } catch(DatabaseException e) { -- 2.47.1