TextViewerAction action = new TextViewerAction(fPatternEditor,
ITextOperationTarget.UNDO);
action.setText(PreferencesMessages.EditTemplateDialog_undo);
fGlobalActions.put(ITextEditorActionConstants.UNDO, action);
handlerActivations.add(handlerService.activateHandler(
IWorkbenchActionDefinitionIds.UNDO, new ActionHandler(action),
expression));
action = new TextViewerAction(fPatternEditor, ITextOperationTarget.REDO);
action.setText(PreferencesMessages.EditTemplateDialog_redo);
fGlobalActions.put(ITextEditorActionConstants.REDO, action);
handlerActivations.add(handlerService.activateHandler(
IWorkbenchActionDefinitionIds.REDO, new ActionHandler(action),
expression));
action = new TextViewerAction(fPatternEditor, ITextOperationTarget.CUT);
action.setText(PreferencesMessages.EditTemplateDialog_cut);
fGlobalActions.put(ITextEditorActionConstants.CUT, action);
action = new TextViewerAction(fPatternEditor, ITextOperationTarget.COPY);
action.setText(PreferencesMessages.EditTemplateDialog_copy);
fGlobalActions.put(ITextEditorActionConstants.COPY, action);
action = new TextViewerAction(fPatternEditor,
ITextOperationTarget.PASTE);
action.setText(PreferencesMessages.EditTemplateDialog_paste);
fGlobalActions.put(ITextEditorActionConstants.PASTE, action);
action = new TextViewerAction(fPatternEditor,
ITextOperationTarget.SELECT_ALL);
action.setText(PreferencesMessages.EditTemplateDialog_select_all);
fGlobalActions.put(ITextEditorActionConstants.SELECT_ALL, action);
action = new TextViewerAction(fPatternEditor,
ISourceViewer.CONTENTASSIST_PROPOSALS);
action.setText(PreferencesMessages.EditTemplateDialog_content_assist);
fGlobalActions.put("ContentAssistProposal", action); //$NON-NLS-1$
handlerActivations.add(handlerService.activateHandler(
ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
new ActionHandler(action), expression));
fSelectionActions.add(ITextEditorActionConstants.CUT);
fSelectionActions.add(ITextEditorActionConstants.COPY);
fSelectionActions.add(ITextEditorActionConstants.PASTE);