bugfix for CCE in TermBasePropertyTester.java (#2924 comment 2) 3.0.11-SNAPSHOT root/branches/taxeditor/3.0.11-SNAPSHOT
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 27 Jun 2012 09:58:04 +0000 (09:58 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 27 Jun 2012 09:58:04 +0000 (09:58 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermBasePropertyTester.java

index e7ca0952d6d2ae176796b4f057b1df08bdc8bade..dfde1e7d84c13b90c65c8c60ffbf4ee159c859df 100644 (file)
@@ -12,7 +12,7 @@ package eu.etaxonomy.taxeditor.editor.definedterm;
 import org.eclipse.core.expressions.PropertyTester;\r
 import org.eclipse.jface.viewers.IStructuredSelection;\r
 \r
-import eu.etaxonomy.cdm.model.common.CdmBase;\r
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;\r
 import eu.etaxonomy.cdm.model.common.DefinedTermBase;\r
 import eu.etaxonomy.cdm.model.common.Marker;\r
 import eu.etaxonomy.cdm.model.common.MarkerType;\r
@@ -37,9 +37,9 @@ public class TermBasePropertyTester extends PropertyTester {
                        Object expectedValue) {\r
                \r
                IStructuredSelection selection = (IStructuredSelection) receiver;\r
-               CdmBase selectedElement = (CdmBase)selection.getFirstElement();\r
-               if (selectedElement != null && selectedElement.isInstanceOf(TermBase.class)){\r
-                       TermBase term = CdmBase.deproxy(selectedElement, TermBase.class);\r
+               Object selectedElement = selection.getFirstElement();\r
+               if (selectedElement != null && HibernateProxyHelper.isInstanceOf(selectedElement, TermBase.class)){\r
+                       TermBase term = HibernateProxyHelper.deproxy(selectedElement, TermBase.class);\r
 \r
                        if(IS_MODIFIABLE.equals(property)){\r
                                return isModifiable(term);\r