add the preference show only ID in Vocabulary in checklist e
authorKatja Luther <k.luther@bgbm.org>
Wed, 8 Jun 2016 14:22:25 +0000 (16:22 +0200)
committerKatja Luther <k.luther@bgbm.org>
Wed, 8 Jun 2016 14:22:25 +0000 (16:22 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java

index 7dc0a900baefc5b4b49e01f7318efc4805fdadef..b8f4ae17a24f6ed975a3c1521f113a87d167ac1b 100644 (file)
@@ -74,6 +74,17 @@ public class ChecklistEditorGeneralPreference extends PreferencePage implements
                 "eu.etaxonomy.taxeditor.store.open.OpenDistributionEditorWizardHandler");
 
         button_openFeatureTree.setText("Open Distribution Selection Wizard");
+        final Button showIdInVocabulary = new Button(child, SWT.CHECK);
+        boolean isShowIdInVocabulary = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.CHECKLIST_ID_IN_VOCABULARY);
+        showIdInVocabulary.setText("Show Id in Vocabulary instead of full title of the areas");
+        showIdInVocabulary.setSelection(isShowIdInVocabulary);
+        showIdInVocabulary.addSelectionListener(new SelectionAdapter(){
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                boolean isShowIdInVocabulary = showIdInVocabulary.getSelection();
+                PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.CHECKLIST_ID_IN_VOCABULARY, isShowIdInVocabulary);
+             }
+        });
         PreferencesUtil.recursiveSetEnabled(button_openFeatureTree, CdmStore.isActive());
 
         if(isEditorActivated){