From 06be67d1bdb9b335df8df6352d88c9cc6c78ea12 Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Sat, 13 May 2017 21:33:37 +0300 Subject: [PATCH] An action to show a pgraph for resources in ontologies #7225 Change-Id: I358fc705d5a7afcb20edb6520019a3689a978cd7 --- bundles/org.simantics.db.layer0/adapters.xml | 5 ++ bundles/org.simantics.debug.ui/plugin.xml | 5 ++ .../debug/ui/internal/TGEditorAdapter.java | 47 +++++++++++++++++++ .../PGraphEditorDocumentProvider.java | 24 ++++++++-- .../org/simantics/modeling/ModelingUtils.java | 25 ++++++---- 5 files changed, 94 insertions(+), 12 deletions(-) create mode 100644 bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/internal/TGEditorAdapter.java diff --git a/bundles/org.simantics.db.layer0/adapters.xml b/bundles/org.simantics.db.layer0/adapters.xml index 13fbd87b2..5586b5fd1 100644 --- a/bundles/org.simantics.db.layer0/adapters.xml +++ b/bundles/org.simantics.db.layer0/adapters.xml @@ -140,6 +140,11 @@ class="org.simantics.db.layer0.adapter.impl.SharedOntologyCopyHandler"> + + + + + getExportMetadata() { @@ -2205,7 +2212,7 @@ public class ModelingUtils { } - public static void exportSharedOntology(ReadGraph graph, Resource library, String fileName, String format, int version) throws DatabaseException { + public static TransferableGraph1 exportSharedOntology(ReadGraph graph, Resource library, String fileName, String format, int version) throws DatabaseException { Layer0 L0 = Layer0.getInstance(graph); String name = graph.getRelatedValue(library, L0.HasName, Bindings.STRING); @@ -2217,7 +2224,7 @@ public class ModelingUtils { LibraryInfo info = new LibraryInfo(name, library, draft); try { - exportSharedOntology(new NullProgressMonitor(), graph, new File(fileName), format, version, info); + return exportSharedOntology(new NullProgressMonitor(), graph, fileName != null ? new File(fileName) : null, format, version, info); } catch (IOException e) { throw new DatabaseException(e); } -- 2.47.1