class="eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler.OpenBulkEditorForIdentifiableEntity"
commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity">
<activeWhen>
- <reference
- definitionId="isBulkEditorSupported">
- </reference>
+ <and>
+ <reference
+ definitionId="isBulkEditorSupported">
+ </reference>
+ <not>
+ <reference
+ definitionId="isBulkEditor">
+ </reference>
+ </not>
+ </and>
</activeWhen>
</handler>
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
if(selectedElement!=null){
if(selectedElement instanceof UuidAndTitleCache){
return BulkEditorInputType.getByType(((UuidAndTitleCache) selectedElement).getType())!=null;
+ }
+ else if(selectedElement instanceof TreeNode){
+ System.out.println(BulkEditorInputType.getByType(((TreeNode) selectedElement).getValue().getClass())!=null);
+ return BulkEditorInputType.getByType(((TreeNode) selectedElement).getValue().getClass())!=null;
}
return BulkEditorInputType.getByType(selectedElement.getClass())!=null;
}
</propertyTester>
<propertyTester
class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DescriptionsMenuPropertyTester"
- id="eu.etaxonomy.taxeditor.descriptions.PropertyTester"
+ id="eu.etaxonomy.taxeditor.descriptions.propertyTester"
namespace="eu.etaxonomy.taxeditor.descriptions.propertyTester"
properties="isMedia,isDescription,isDescriptionElement,isDeletable,isFeatureNodeContainer,isImageGallery,isTaxonEditor,isBulkEditor,isDerivateEditor, isIndividualsAssociation"
type="org.eclipse.jface.viewers.TreeSelection">
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
if (selectedObject instanceof UuidAndTitleCache){
selectedObject = CdmStore.getCommonService().find(CdmBase.class, ((UuidAndTitleCache)selectedObject).getUuid());
}
+ //for tree nodes get the value resp. the object of the node
+ else if (selectedObject instanceof TreeNode){
+ selectedObject = ((TreeNode) selectedObject).getValue();
+ }
if(selectedObject instanceof ICdmBase){
params.put(command.getId()+".uuid", ((ICdmBase) selectedObject).getUuid()); //$NON-NLS-1$
}
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.TreeNode;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache)input;
input = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid());
}
+ //for tree nodes get the value resp. the object of the node
+ else if (input instanceof TreeNode){
+ TreeNode treeNode = (TreeNode)input;
+ input = treeNode.getValue();
+ }
IExtensionRegistry reg = Platform.getExtensionRegistry();