From b2ec2045289a5aa41a2a6804f03890336e220cde Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Wed, 26 Feb 2020 14:28:50 +0200 Subject: [PATCH] Restore SCL-compatible API to P3DUtil P3DUtil.scl was broken by d207cfa3235339e7d7b894494be400160b121bd5 gitlab #88 Change-Id: I047f0e94ca8f3320097be2b64cbbc3dbbf62b6bd --- .../org/simantics/plant3d/utils/P3DUtil.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) 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>() { -- 2.47.1