Project

General

Profile

« Previous | Next » 

Revision 95d1ab8c

Added by Patrick Plitzner over 6 years ago

ref #6909 migrate taxon navigator context menu

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
72 72
import eu.etaxonomy.taxeditor.operation.IPostMoniteredOperationEnabled;
73 73
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
74 74
import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
75
import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
75 76
import eu.etaxonomy.taxeditor.store.CdmStore;
76 77
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
77 78
import eu.etaxonomy.taxeditor.ui.dialog.ReportTextDialog;
......
285 286
        return Status.OK_STATUS;
286 287
    }
287 288

  
289
    public static IStatus executeOperation(final AbstractOperation operation, final RemotingCdmHandlerE4 handler) {
290
        return executeOperation(operation, handler);
291
    }
292

  
288 293
    public static IStatus executeOperation(final AbstractOperation operation, final RemotingCdmHandler handler) {
294
        return executeOperation(operation, handler);
295
    }
296

  
297
    public static IStatus executeOperation(final AbstractOperation operation, final Object handler) {
289 298
        if (getOperationHistory() == null) {
290 299
            throw new IllegalArgumentException(
291 300
                    "There is no operation history for this context");
......
306 315
                    operation.addContext(IOperationHistory.GLOBAL_UNDO_CONTEXT);
307 316
                    status = getOperationHistory().execute(operation, monitor,
308 317
                            uiInfoAdapter);
309
                    if(handler != null) {
310
                        handler.postOperation(status);
318
                    if(handler instanceof RemotingCdmHandler) {
319
                        ((RemotingCdmHandler) handler).postOperation(status);
320
                    }
321
                    else if(handler instanceof RemotingCdmHandlerE4) {
322
                        ((RemotingCdmHandlerE4) handler).postOperation(status);
311 323
                    }
312 324
                } catch (ExecutionException e) {
313 325
                    MessagingUtils.operationDialog(this, e, TaxeditorStorePlugin.PLUGIN_ID, operationlabel, null);

Also available in: Unified diff