3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.preference
;
13 import org
.eclipse
.core
.expressions
.PropertyTester
;
17 * @created Jan 26, 2011
20 public class PreferencePropertyTester
extends PropertyTester
{
23 private static final String SHOW_EXPERIMENTAL_FEATURES
= "isShowExperimentalFeatures";
25 private static final String SHOW_CHECKLIST_EDITOR
= "isChecklistEditorEnabled";
28 public boolean test(Object receiver
, String property
, Object
[] args
,
29 Object expectedValue
) {
30 if(SHOW_EXPERIMENTAL_FEATURES
.equals(property
)){
31 return isShowExperimentalFeatures();
33 if(SHOW_CHECKLIST_EDITOR
.equals(property
)){
34 return isChecklistEditorEnabled();
42 private boolean isShowExperimentalFeatures() {
43 return PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_EXPERIMENTAL_FEATURES
);
46 private boolean isChecklistEditorEnabled() {
47 return PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.DISTRIBUTION_AREA_PREFRENCES_ACTIVE
);