private static final String CONFIRM_DELETION = Messages.DeleteHandler_CONFIRM;
@Execute
- public void execute(@Named(IServiceConstants.ACTIVE_SELECTION)CdmBase object,
+ public void execute(@Named(IServiceConstants.ACTIVE_SELECTION)Object selection,
@Named(IServiceConstants.ACTIVE_PART)MPart activePart,
@Named(IServiceConstants.ACTIVE_SHELL)Shell shell) {
BulkEditorE4 editor= (BulkEditorE4) activePart.getObject();
- DeleteConfiguratorBase config = null;
- DeleteResult result = new DeleteResult();
- String errorMessage= OBJECT;
if (editor.isDirty()){
boolean proceed = MessageDialog.openQuestion(null,
"Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?");
return ;
}
}
+ if(selection instanceof Object[]){
+ for (Object object: (Object[])selection) {
+ if(object instanceof CdmBase){
+ delete((CdmBase) object, shell, editor);
+ }
+ }
+ }
+ else if(selection instanceof CdmBase){
+ delete((CdmBase) selection, shell, editor);
+ }
+
+ }
+ private void delete(CdmBase object, Shell shell, BulkEditorE4 editor){
+ String errorMessage= OBJECT;
+ DeleteConfiguratorBase config = null;
+ DeleteResult result = new DeleteResult();
try {
ICdmRepository controller;
controller = CdmStore.getCurrentApplicationConfiguration();