+// $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;
+ }
+}