From: Reino Ruusu Date: Wed, 26 Feb 2020 12:28:50 +0000 (+0200) Subject: Restore SCL-compatible API to P3DUtil X-Git-Tag: v1.43.0~57 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F34%2F3934%2F2;p=simantics%2F3d.git Restore SCL-compatible API to P3DUtil P3DUtil.scl was broken by d207cfa3235339e7d7b894494be400160b121bd5 gitlab #88 Change-Id: I047f0e94ca8f3320097be2b64cbbc3dbbf62b6bd --- diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java b/org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java index 2f5972a8..42a3b9a0 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/utils/P3DUtil.java @@ -25,13 +25,21 @@ import org.simantics.plant3d.scenegraph.PipeRun; import org.simantics.plant3d.scenegraph.PipelineComponent; import org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint; import org.simantics.plant3d.scenegraph.controlpoint.PipingRules; +import org.simantics.plant3d.scl.SCLUtil; import org.simantics.plant3d.utils.Item.Type; public class P3DUtil { + public static List getEquipments() throws DatabaseException { + return getEquipments(SCLUtil.getRequestProcessor()); + } public static List getEquipments(RequestProcessor session) throws DatabaseException { return getEquipments(session, Plant3D.URIs.Builtin); } + + public static List getEquipments(final String libUri) throws DatabaseException { + return getEquipments(SCLUtil.getRequestProcessor(), libUri); + } public static List getEquipments(RequestProcessor session, final String libUri) throws DatabaseException { return session.syncRequest(new Read>() { @@ -49,6 +57,10 @@ public class P3DUtil { }); } + public static List getNozzles(String libUri) throws DatabaseException { + return getNozzles(SCLUtil.getRequestProcessor(), libUri); + } + public static List getNozzles(RequestProcessor session, String libUri) throws DatabaseException { return session.syncRequest(new Read>() { @Override @@ -94,6 +106,10 @@ public class P3DUtil { } } + public static List getEnds(String libUri) throws DatabaseException { + return getEnds(SCLUtil.getRequestProcessor(), libUri); + } + public static List getEnds(RequestProcessor session, String libUri) throws DatabaseException { return session.syncRequest(new Read>() { @Override @@ -104,6 +120,10 @@ public class P3DUtil { } }); } + + public static List getTurns(String libUri) throws DatabaseException { + return getTurns(SCLUtil.getRequestProcessor(), libUri); + } public static List getTurns(RequestProcessor session, String libUri) throws DatabaseException { return session.syncRequest(new Read>() { @@ -115,6 +135,10 @@ public class P3DUtil { } }); } + + public static List getInlines(String libUri) throws DatabaseException { + return getInlines(SCLUtil.getRequestProcessor(), libUri); + } public static List getInlines(RequestProcessor session, String libUri) throws DatabaseException { return session.syncRequest(new Read>() {