From: lehtonen Date: Thu, 25 Mar 2010 18:03:18 +0000 (+0000) Subject: Stop using org.simantics.db.common.uri.URIToResource and favor Queries.resource(Strin... X-Git-Tag: apros-i4-rc2~11 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=b4a09bee227c7abb6fd7b76f8ee2b999dc813295;p=simantics%2Fsysdyn.git Stop using org.simantics.db.common.uri.URIToResource and favor Queries.resource(String URI) instead. Anyway, fixed a problem in URIToResource, or rather ChildMapOfResource which caused it to fail when a resource did not have a Name property which will happen eventually anyway. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@15221 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java index 8cfabfcb..073dffdf 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java @@ -17,7 +17,7 @@ import org.simantics.db.Builtins; import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.db.WriteGraph; -import org.simantics.db.common.uri.URIToResource; +import org.simantics.db.common.request.Queries; import org.simantics.db.exception.DatabaseException; import org.simantics.db.service.LifecycleSupport; import org.simantics.project.ProjectElementType; @@ -57,7 +57,7 @@ public class SysdynProject extends AbstractProjectFeature { @Override public void openEditor(Session session, String uri) throws PartInitException { try { - Resource resource = session.syncRequest(new URIToResource(uri)); + Resource resource = session.syncRequest(Queries.resource(uri)); session.syncRequest(new ChooseActionRequest(null, resource, WorkbenchUtils.getCurrentPerspectiveId())); } catch (DatabaseException e) { LifecycleSupport ls = session.getService(LifecycleSupport.class);