]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Stop using org.simantics.db.common.uri.URIToResource and favor Queries.resource(Strin...
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 25 Mar 2010 18:03:18 +0000 (18:03 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 25 Mar 2010 18:03:18 +0000 (18:03 +0000)
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

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProject.java

index 8cfabfcbfdc0938aa8a8df6aa2e94ca942c59e3b..073dffdf5c20ae1ea27440b346c008405128a9e0 100644 (file)
@@ -17,7 +17,7 @@ import org.simantics.db.Builtins;
 import org.simantics.db.Resource;\r
 import org.simantics.db.Session;\r
 import org.simantics.db.WriteGraph;\r
-import org.simantics.db.common.uri.URIToResource;\r
+import org.simantics.db.common.request.Queries;\r
 import org.simantics.db.exception.DatabaseException;\r
 import org.simantics.db.service.LifecycleSupport;\r
 import org.simantics.project.ProjectElementType;\r
@@ -57,7 +57,7 @@ public class SysdynProject extends AbstractProjectFeature {
         @Override\r
         public void openEditor(Session session, String uri) throws PartInitException {\r
             try {\r
-                Resource resource = session.syncRequest(new URIToResource(uri));\r
+                Resource resource = session.syncRequest(Queries.resource(uri));\r
                 session.syncRequest(new ChooseActionRequest(null, resource, WorkbenchUtils.getCurrentPerspectiveId()));\r
             } catch (DatabaseException e) {\r
                 LifecycleSupport ls = session.getService(LifecycleSupport.class);\r