-
- public static void doExport(IProgressMonitor monitor, File location, final LibraryInfo info, boolean pgraphAndTg) throws DatabaseException, IOException {
- ModelingUtils.exportSharedOntology(monitor, Simantics.getSession(), location,Constants.SHARED_LIBRARY_FORMAT, Constants.SHARED_LIBRARY_CURRENT_VERSION, info);
- if (pgraphAndTg) {
+
+ public static void doExport(IProgressMonitor monitor, File location, LibraryInfo info, boolean writeTg, boolean dumpStructure) throws DatabaseException, IOException {
+ int work = 1 + (writeTg ? 1 : 0) + (dumpStructure ? 1 : 0);
+ SubMonitor mon = SubMonitor.convert(monitor, work);
+
+ ModelingUtils.exportSharedOntology(mon.split(1, SubMonitor.SUPPRESS_NONE), Simantics.getSession(), location, Constants.SHARED_LIBRARY_FORMAT, Constants.SHARED_LIBRARY_CURRENT_VERSION, info);
+
+ Path input = location.toPath();
+
+ if (writeTg) {