Project

General

Profile

Revision a3456830

IDa34568307dcc3e9919d9d9b4fa0080c0ed00b04b
Parent 5bfed917
Child 403d38f8

Added by Andreas Müller almost 9 years ago

bugfix for CCE in TermBasePropertyTester.java (#2924 comment 2) integrated in trunk

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/TermBasePropertyTester.java
12 12
import org.eclipse.core.expressions.PropertyTester;
13 13
import org.eclipse.jface.viewers.IStructuredSelection;
14 14

  
15
import eu.etaxonomy.cdm.model.common.CdmBase;
15
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
16 16
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
17 17
import eu.etaxonomy.cdm.model.common.Marker;
18 18
import eu.etaxonomy.cdm.model.common.MarkerType;
......
37 37
			Object expectedValue) {
38 38
		
39 39
		IStructuredSelection selection = (IStructuredSelection) receiver;
40
		CdmBase selectedElement = (CdmBase)selection.getFirstElement();
41
		if (selectedElement != null && selectedElement.isInstanceOf(TermBase.class)){
42
			TermBase term = CdmBase.deproxy(selectedElement, TermBase.class);
40
		Object selectedElement = selection.getFirstElement();
41
		if (selectedElement != null && HibernateProxyHelper.isInstanceOf(selectedElement, TermBase.class)){
42
			TermBase term = HibernateProxyHelper.deproxy(selectedElement, TermBase.class);
43 43

  
44 44
			if(IS_MODIFIABLE.equals(property)){
45 45
				return isModifiable(term);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)