Revision c4a7540a
Added by Patrick Plitzner about 7 years ago
eu.etaxonomy.taxeditor.molecular/src/main/java/eu/etaxonomy/taxeditor/molecular/handler/ToggleInsertOverwriteHandler.java | ||
---|---|---|
22 | 22 |
import org.eclipse.ui.menus.UIElement; |
23 | 23 |
|
24 | 24 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
25 |
import eu.etaxonomy.taxeditor.molecular.Messages; |
|
25 | 26 |
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor; |
26 | 27 |
|
27 | 28 |
|
... | ... | |
34 | 35 |
*/ |
35 | 36 |
public class ToggleInsertOverwriteHandler extends AbstractAlignmentEditorHandler implements IElementUpdater { |
36 | 37 |
public static final String COMMAND_ID = |
37 |
"eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite"; |
|
38 |
"eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite"; //$NON-NLS-1$
|
|
38 | 39 |
|
39 | 40 |
|
40 |
private final ImageDescriptor INSERT_DESCRIPTOR = HandlerTools.createImageDescriptor("insert-16x16.png"); |
|
41 |
private final ImageDescriptor OVERWRITE_DESCRIPTOR = HandlerTools.createImageDescriptor("overwrite-16x16.png"); |
|
41 |
private final ImageDescriptor INSERT_DESCRIPTOR = HandlerTools.createImageDescriptor("insert-16x16.png"); //$NON-NLS-1$
|
|
42 |
private final ImageDescriptor OVERWRITE_DESCRIPTOR = HandlerTools.createImageDescriptor("overwrite-16x16.png"); //$NON-NLS-1$
|
|
42 | 43 |
|
43 | 44 |
|
44 | 45 |
@Override |
... | ... | |
53 | 54 |
if (activeEditor instanceof AlignmentEditor) { |
54 | 55 |
if (((AlignmentEditor)activeEditor).isInsertMode()) { |
55 | 56 |
element.setIcon(INSERT_DESCRIPTOR); |
56 |
element.setText("INS"); |
|
57 |
element.setTooltip("Click to switch to overwrite mode");
|
|
57 |
element.setText("INS"); //$NON-NLS-1$
|
|
58 |
element.setTooltip(Messages.ToggleInsertOverwriteHandler_SWITCH_OVERWRITE);
|
|
58 | 59 |
} |
59 | 60 |
else { |
60 | 61 |
element.setIcon(OVERWRITE_DESCRIPTOR); |
61 |
element.setText("OVR"); |
|
62 |
element.setTooltip("Click to switch to insertion mode");
|
|
62 |
element.setText("OVR"); //$NON-NLS-1$
|
|
63 |
element.setTooltip(Messages.ToggleInsertOverwriteHandler_SWITCH_INSERTION);
|
|
63 | 64 |
} |
64 | 65 |
((ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class)).refreshElements( |
65 | 66 |
ToggleLeftRightInsertionHandler.COMMAND_ID, null); |
Also available in: Unified diff
ref #4611 i18n for molecular plugin