]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sharedontology/wizard/ModelImportWizard.java
Red background color & tooltip for invalid derived property expression
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / sharedontology / wizard / ModelImportWizard.java
index bb0d6f68a7958832f4221bf1738a3523cd34df1b..23d3419845993d6c9e1e16109c7444b4926cea88 100644 (file)
@@ -56,7 +56,7 @@ public class ModelImportWizard extends Wizard implements IImportWizard {
         String recentPathsPref = store.getString(Preferences.RECENT_SHARED_LIBRARY_IMPORT_LOCATIONS);
         Deque<String> recentImportPaths = Preferences.decodePaths(recentPathsPref);
 
-        ISessionContext ctx = SimanticsUI.getSessionContext();
+        ISessionContext ctx = Simantics.getSessionContext();
         if (ctx == null)
             return false;
         IProject project = ctx.getHint(ProjectKeys.KEY_PROJECT);
@@ -66,6 +66,7 @@ public class ModelImportWizard extends Wizard implements IImportWizard {
         importModel = new ImportPlan(ctx, recentImportPaths);
         importModel.project = project;
         importModel.selection = selection.getFirstElement();
+        importModel.includeDependencies = store.getBoolean(Preferences.IMPORT_INCLUDE_DEPENDENCIES);
 
         return true;
     }
@@ -74,6 +75,7 @@ public class ModelImportWizard extends Wizard implements IImportWizard {
         IPersistentPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);
 
         store.putValue(Preferences.RECENT_SHARED_LIBRARY_IMPORT_LOCATIONS, Preferences.encodePaths(importModel.recentLocations));
+        store.setValue(Preferences.IMPORT_INCLUDE_DEPENDENCIES, importModel.includeDependencies);
 
         if (store.needsSaving())
             store.save();