]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sharedontology/wizard/ModelExportWizard.java
Added preference for Import dependencies in generic model import/export
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / sharedontology / wizard / ModelExportWizard.java
index 37996107eb9d0829fe71cd654a182d86f28d506f..182c0f6fcb59a2835666687777c6fea5278d8210 100644 (file)
@@ -37,7 +37,7 @@ import org.simantics.utils.ui.ExceptionUtils;
 
 /**
  * @author Tuukka Lehtonen
 
 /**
  * @author Tuukka Lehtonen
- * @author Teemu Mätäsniemi
+ * @author Teemu Mätäsniemi
  * @author Antti Villberg
  */
 public class ModelExportWizard extends Wizard implements IExportWizard {
  * @author Antti Villberg
  */
 public class ModelExportWizard extends Wizard implements IExportWizard {
@@ -46,8 +46,9 @@ public class ModelExportWizard extends Wizard implements IExportWizard {
 
     Deque<String>            recentExportPaths;
     boolean                  overwrite;
 
     Deque<String>            recentExportPaths;
     boolean                  overwrite;
+    boolean                  includeDependencies;
 
 
-    ExportPlan        exportModel;
+    ExportPlan               exportModel;
 
     private boolean readPreferences() {
         IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);
 
     private boolean readPreferences() {
         IPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);
@@ -55,6 +56,7 @@ public class ModelExportWizard extends Wizard implements IExportWizard {
         String recentPathsPref = store.getString(Preferences.RECENT_SHARED_LIBRARY_EXPORT_LOCATIONS);
         recentExportPaths = Preferences.decodePaths(recentPathsPref);
         overwrite = store.getBoolean(Preferences.SHARED_LIBRARY_EXPORT_OVERWRITE);
         String recentPathsPref = store.getString(Preferences.RECENT_SHARED_LIBRARY_EXPORT_LOCATIONS);
         recentExportPaths = Preferences.decodePaths(recentPathsPref);
         overwrite = store.getBoolean(Preferences.SHARED_LIBRARY_EXPORT_OVERWRITE);
+        includeDependencies = store.getBoolean(Preferences.EXPORT_INCLUDE_DEPENDENCIES);
 
         return true;
     }
 
         return true;
     }
@@ -64,6 +66,7 @@ public class ModelExportWizard extends Wizard implements IExportWizard {
 
         store.putValue(Preferences.RECENT_SHARED_LIBRARY_EXPORT_LOCATIONS, Preferences.encodePaths(recentExportPaths));
         store.setValue(Preferences.SHARED_LIBRARY_EXPORT_OVERWRITE, exportModel.overwrite);
 
         store.putValue(Preferences.RECENT_SHARED_LIBRARY_EXPORT_LOCATIONS, Preferences.encodePaths(recentExportPaths));
         store.setValue(Preferences.SHARED_LIBRARY_EXPORT_OVERWRITE, exportModel.overwrite);
+        store.setValue(Preferences.EXPORT_INCLUDE_DEPENDENCIES, exportModel.includeDependencies);
 
         if (store.needsSaving())
             store.save();
 
         if (store.needsSaving())
             store.save();
@@ -89,6 +92,7 @@ public class ModelExportWizard extends Wizard implements IExportWizard {
         exportModel.project = project;
         exportModel.selection = selection;
         exportModel.overwrite = overwrite;
         exportModel.project = project;
         exportModel.selection = selection;
         exportModel.overwrite = overwrite;
+        exportModel.includeDependencies = includeDependencies;
     }
 
     @Override
     }
 
     @Override