Revision f13a970a
Added by Patrick Plitzner almost 7 years ago
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleInsertOverwriteHandler.java | ||
---|---|---|
15 | 15 |
import org.eclipse.core.commands.ExecutionEvent; |
16 | 16 |
import org.eclipse.core.commands.ExecutionException; |
17 | 17 |
import org.eclipse.jface.resource.ImageDescriptor; |
18 |
import org.eclipse.ui.IEditorPart; |
|
19 | 18 |
import org.eclipse.ui.PlatformUI; |
20 | 19 |
import org.eclipse.ui.commands.ICommandService; |
21 | 20 |
import org.eclipse.ui.commands.IElementUpdater; |
... | ... | |
50 | 49 |
|
51 | 50 |
@Override |
52 | 51 |
public void updateElement(UIElement element, @SuppressWarnings("rawtypes") Map parameters) { |
53 |
IEditorPart activeEditor = AbstractUtility.getActiveEditor();
|
|
52 |
Object activeEditor = AbstractUtility.getActiveE4Editor();
|
|
54 | 53 |
if (activeEditor instanceof AlignmentEditor) { |
55 | 54 |
if (((AlignmentEditor)activeEditor).isInsertMode()) { |
56 | 55 |
element.setIcon(INSERT_DESCRIPTOR); |
... | ... | |
62 | 61 |
element.setText("OVR"); //$NON-NLS-1$ |
63 | 62 |
element.setTooltip(Messages.ToggleInsertOverwriteHandler_SWITCH_INSERTION); |
64 | 63 |
} |
65 |
((ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class)).refreshElements(
|
|
64 |
PlatformUI.getWorkbench().getService(ICommandService.class).refreshElements(
|
|
66 | 65 |
ToggleLeftRightInsertionHandler.COMMAND_ID, null); |
67 | 66 |
} |
68 | 67 |
} |
Also available in: Unified diff
ref #6596 Refactored selection handling to support e3 and e4 parts