eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/MatchStrategyConfigurator.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmPreferences.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/CdmStorePropertyTester.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DefaultFeatureTreePreferenecs.java -text
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DescriptionPreferences.java -text
class="eu.etaxonomy.taxeditor.preference.PreferencePropertyTester"
id="eu.etaxonomy.taxeditor.preferences.propertyTester"
namespace="eu.etaxonomy.taxeditor.preferences.propertyTester"
- properties="isCdmStoreConnected, isShowExperimentalFeatures, isChecklistEditorEnabled"
+ properties="isShowExperimentalFeatures, isChecklistEditorEnabled"
type="org.eclipse.jface.viewers.IStructuredSelection">
</propertyTester>
+ <propertyTester
+ class="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+ id="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+ namespace="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester"
+ properties="isCdmStoreConnected"
+ type="java.lang.Object">
+ </propertyTester>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
</definition>
<definition
id="isCdmStoreConnected">
- <with
- variable="selection">
- <test
- property="eu.etaxonomy.taxeditor.preferences.propertyTester.isCdmStoreConnected">
- </test>
- </with>
+ <test
+ property="eu.etaxonomy.taxeditor.preference.CdmStorePropertyTester.isCdmStoreConnected">
+ </test>
</definition>
<definition
id="isShowExperimentalFeatures">
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* 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.
+*/
+
+package eu.etaxonomy.taxeditor.preference;
+
+import org.eclipse.core.expressions.PropertyTester;
+
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ * @created Jan 26, 2011
+ * @version 1.0
+ */
+public class CdmStorePropertyTester extends PropertyTester {
+
+ private static final String EDITOR_IS_CONNECTED_TO_DB = "isCdmStoreConnected";
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args,
+ Object expectedValue) {
+
+ if(EDITOR_IS_CONNECTED_TO_DB.equals(property)){
+ return isCdmStoreConnected();
+ }
+ return false;
+ }
+
+ private boolean isCdmStoreConnected(){
+ boolean active = CdmStore.isActive();
+ return active;
+ }
+}
import org.eclipse.core.expressions.PropertyTester;
-import eu.etaxonomy.taxeditor.store.CdmStore;
-
/**
* @author n.hoffmann
* @created Jan 26, 2011
private static final String SHOW_CHECKLIST_EDITOR = "isChecklistEditorEnabled";
- private static final String EDITOR_IS_CONNECTED_TO_DB = "isCdmStoreConnected";
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
@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();
}
- if(EDITOR_IS_CONNECTED_TO_DB.equals(property)){
- return isCdmStoreConnected();
- }
-
return false;
}
return PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE);
}
- private boolean isCdmStoreConnected(){
- boolean active = CdmStore.isActive();
- return active;
- }
}