Revision 8d6b7efd
Added by Patrick Plitzner almost 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
70 | 70 |
import eu.etaxonomy.taxeditor.operation.IFeedbackGenerator; |
71 | 71 |
import eu.etaxonomy.taxeditor.operation.IPostMoniteredOperationEnabled; |
72 | 72 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
73 |
import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler; |
|
74 | 73 |
import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4; |
75 | 74 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
76 | 75 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
... | ... | |
172 | 171 |
return executeOperation_internal(operation, handler, sync); |
173 | 172 |
} |
174 | 173 |
|
175 |
public static IStatus executeOperation(final AbstractOperation operation, final RemotingCdmHandler handler, UISynchronize sync) { |
|
176 |
return executeOperation_internal(operation, handler, sync); |
|
177 |
} |
|
178 |
|
|
179 |
private static IStatus executeOperation_internal(final AbstractOperation operation, final Object handler, |
|
174 |
private static IStatus executeOperation_internal(final AbstractOperation operation, final RemotingCdmHandlerE4 handler, |
|
180 | 175 |
UISynchronize sync) { |
181 | 176 |
if (getOperationHistory() == null) { |
182 | 177 |
throw new IllegalArgumentException( |
... | ... | |
196 | 191 |
operation.addContext(IOperationHistory.GLOBAL_UNDO_CONTEXT); |
197 | 192 |
status = operation.execute(monitor, |
198 | 193 |
uiInfoAdapter); |
199 |
if(handler instanceof RemotingCdmHandler) { |
|
200 |
((RemotingCdmHandler) handler).postOperation(status); |
|
201 |
} |
|
202 |
else if(handler instanceof RemotingCdmHandlerE4) { |
|
203 |
((RemotingCdmHandlerE4) handler).postOperation(status); |
|
204 |
} |
|
194 |
handler.postOperation(status); |
|
205 | 195 |
} catch (ExecutionException e) { |
206 | 196 |
MessagingUtils.operationDialog(AbstractUtility.class, e, TaxeditorStorePlugin.PLUGIN_ID, operationlabel, null); |
207 | 197 |
} finally { |
Also available in: Unified diff
ref #6913 Remove remaining handlers