merge-update from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / PreferencePropertyTester.java
index aee9397c910af0f5c1c76775635539f054f42f8d..5b1a935daa92c9234b6ce410b337b0c9a8946d5a 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -21,18 +21,18 @@ public class PreferencePropertyTester extends PropertyTester {
 
 
        private static final String SHOW_EXPERIMENTAL_FEATURES = "isShowExperimentalFeatures";
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
-        */
+
+    private static final String SHOW_CHECKLIST_EDITOR = "isChecklistEditorEnabled";
+
        @Override
        public boolean test(Object receiver, String property, Object[] args,
                        Object expectedValue) {
-               
                if(SHOW_EXPERIMENTAL_FEATURES.equals(property)){
                        return isShowExperimentalFeatures();
                }
-               
+           if(SHOW_CHECKLIST_EDITOR.equals(property)){
+               return isChecklistEditorEnabled();
+           }
                return false;
        }
 
@@ -42,5 +42,9 @@ public class PreferencePropertyTester extends PropertyTester {
        private boolean isShowExperimentalFeatures() {
                return PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES);
        }
-       
+
+       private boolean isChecklistEditorEnabled() {
+        return PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE);
+    }
+
 }