Project

General

Profile

« Previous | Next » 

Revision 459dc5dc

Added by Niels Hoffmann almost 13 years ago

Fixes #2383

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/DescriptionsMenuPropertyTester.java
25 25
	private static final String DESCRIPTION = "isDescription";
26 26
	private static final String DESCRIPTION_ELEMENT = "isDescriptionElement";
27 27
	private static final String DELETABLE = "isDeletable";
28
	private static final String IMAGE_GALLERY = "isImageGallery";
28 29
	
29 30
	/* (non-Javadoc)
30 31
	 * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
......
55 56
		else if(DELETABLE.equals(property)){
56 57
			return isDeletable(selectedElements);
57 58
		}
59
		else if(IMAGE_GALLERY.equals(property)){
60
			return isImageGallery(selectedElements);
61
		}
58 62
		else{
59 63
			return false;
60 64
		}
61 65
	}
62 66
	
67
	private boolean isImageGallery(Object[] selectedElements) {
68
		for (Object object : selectedElements){		
69
			if(!(object instanceof DescriptionBase) || !((DescriptionBase) object).isImageGallery()){
70
				return false;
71
			}
72
		}
73
		return true;
74
	}
75

  
63 76
	private boolean isFeatureNodeContainer(Object[] selectedElements) {
64 77
		for (Object object : selectedElements){
65 78
			if(!(object instanceof FeatureNodeContainer)){

Also available in: Unified diff