Revision df1b7e8c
Added by Lutz Suhrbier almost 13 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import java.lang.reflect.InvocationTargetException; |
14 | 14 |
|
15 |
import javax.naming.OperationNotSupportedException; |
|
16 |
|
|
15 | 17 |
import org.apache.log4j.Logger; |
16 | 18 |
import org.eclipse.core.commands.ExecutionException; |
17 | 19 |
import org.eclipse.core.commands.operations.IOperationHistory; |
20 |
import org.eclipse.core.commands.operations.IUndoContext; |
|
18 | 21 |
import org.eclipse.core.runtime.IAdaptable; |
19 | 22 |
import org.eclipse.core.runtime.ILog; |
20 | 23 |
import org.eclipse.core.runtime.IProgressMonitor; |
... | ... | |
41 | 44 |
import org.eclipse.ui.IWorkbenchPart; |
42 | 45 |
import org.eclipse.ui.PartInitException; |
43 | 46 |
import org.eclipse.ui.PlatformUI; |
44 |
import org.eclipse.ui.ide.undo.WorkspaceUndoUtil; |
|
45 | 47 |
import org.eclipse.ui.part.EditorPart; |
46 | 48 |
import org.eclipse.ui.progress.IProgressService; |
47 | 49 |
import org.eclipse.ui.progress.IWorkbenchSiteProgressService; |
48 | 50 |
import org.eclipse.ui.themes.ITheme; |
49 | 51 |
import org.eclipse.ui.themes.IThemeManager; |
50 | 52 |
|
53 |
import eu.etaxonomy.taxeditor.io.wizard.AbcdImportWizard; |
|
51 | 54 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
52 | 55 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
56 |
import eu.etaxonomy.taxeditor.singlesource.org.eclipse.ide.undo.WorkspaceUndoUtilFacade; |
|
57 |
import eu.etaxonomy.taxeditor.singlesource.org.eclipse.swt.widgets.DisplayProxy; |
|
53 | 58 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
54 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
55 | 59 |
import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer; |
56 | 60 |
import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart; |
57 | 61 |
import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart; |
... | ... | |
67 | 71 |
*/ |
68 | 72 |
public abstract class AbstractUtility { |
69 | 73 |
|
74 |
private static final Logger logger = Logger.getLogger(AbstractUtility.class); |
|
70 | 75 |
/** Constant <code>statusLineManager</code> */ |
71 | 76 |
protected static IStatusLineManager statusLineManager; |
72 | 77 |
|
... | ... | |
432 | 437 |
"There is no operation history for this context"); |
433 | 438 |
} |
434 | 439 |
|
435 |
final IAdaptable uiInfoAdapter = WorkspaceUndoUtil |
|
436 |
.getUIInfoAdapter(getShell()); |
|
440 |
/** RAPSS:Modify |
|
441 |
* |
|
442 |
*/ |
|
443 |
IAdaptable uiInfoAdapterDummy = null; |
|
444 |
try { |
|
445 |
uiInfoAdapterDummy = WorkspaceUndoUtilFacade.getUIInfoAdapter(getShell()); |
|
446 |
} catch (OperationNotSupportedException e) { |
|
447 |
logger.warn(e.getMessage()); |
|
448 |
} |
|
449 |
final IAdaptable uiInfoAdapter = uiInfoAdapterDummy; |
|
450 |
|
|
437 | 451 |
|
438 | 452 |
IRunnableWithProgress runnable = new IRunnableWithProgress() { |
439 | 453 |
|
... | ... | |
443 | 457 |
IStatus status = Status.CANCEL_STATUS; |
444 | 458 |
try { |
445 | 459 |
operation.addContext(IOperationHistory.GLOBAL_UNDO_CONTEXT); |
446 |
status = getOperationHistory().execute(operation, monitor, |
|
447 |
uiInfoAdapter); |
|
460 |
status = getOperationHistory().execute(operation, monitor, uiInfoAdapter); |
|
448 | 461 |
} catch (ExecutionException e) { |
449 | 462 |
errorDialog("Error executing operation", getClass(), String.format("An error occured while executing %s.", operation.getLabel()), e); |
450 | 463 |
} finally { |
Also available in: Unified diff
Compiliert unter RAP, und scheint unter RCP soweit zu laufen.