ref #7063: better handling of preferences for distribution editor and other places
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / wizard / AvailableAreaVocabulariesPage.java
index a7e0aac0f43982767466643f866266716713022a..6b86735572a166807c187aedd5f368892aae19d4 100755 (executable)
@@ -38,12 +38,14 @@ import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
  *
  */
 public class AvailableAreaVocabulariesPage  extends AbstractAreaSelectionWizard implements ICdmEntitySessionEnabled{
+    boolean localPref;
 
     /**
      * @param pageName
      */
-    public AvailableAreaVocabulariesPage(String pageName) {
+    public AvailableAreaVocabulariesPage(String pageName, boolean localPref) {
         super(pageName);
+        this.localPref = localPref;
 
     }
 
@@ -53,7 +55,9 @@ public class AvailableAreaVocabulariesPage  extends AbstractAreaSelectionWizard
     @Override
     public void createControl(Composite parent) {
         IPreferenceStore preferenceStore = PreferencesUtil.getPreferenceStore();
-        String checkedValues = preferenceStore.getString(PreferencesUtil.DISTRIBUTION_VOCABULARIES);
+       // String checkedValues = preferenceStore.getString(PreferencesUtil.DISTRIBUTION_VOCABULARIES);
+
+        String vocString = PreferencesUtil.getPreferredVocabulariesForDistributionEditor(localPref);
        // String grayedValues = preferenceStore.getString(PreferencesUtil.DISTRIBUTION_AREA_OCCURENCE_STATUS_GRAYED);
         setTitle("Select vocabularies for Distribution Editor");
         setDescription("In order to be able to modify and see the distribution status of taxa,\n"
@@ -96,7 +100,7 @@ public class AvailableAreaVocabulariesPage  extends AbstractAreaSelectionWizard
 
             }
         });
-        rememberCheckedValues(checkedValues, null);
+        rememberCheckedValues(vocString, null);
         setControl(composite);
 
     }