@Override
protected void createActions() {
super.createActions();
if (getSourceViewerConfiguration().getContentFormatter(getSourceViewer()) != null) {
Action action = new TextOperationAction(XtextUIMessages.getResourceBundle(),
"Format.", this, ISourceViewer.FORMAT);
action.setActionDefinitionId(Activator.PLUGIN_ID + ".FormatAction");
setAction("Format", action);
markAsStateDependentAction("Format", true);
markAsSelectionDependentAction("Format", true);
}
ToggleSLCommentAction action = toggleSLCommentActionFactory.create(XtextUIMessages.getResourceBundle(),
"ToggleComment.", this);
action.setActionDefinitionId(Activator.PLUGIN_ID + ".ToggleCommentAction");
setAction("ToggleComment", action);
markAsStateDependentAction("ToggleComment", true);
markAsSelectionDependentAction("ToggleComment", true);
configureToggleCommentAction(action);
SelectMarkerRulerAction markerAction = new XtextMarkerRulerAction(XtextUIMessages.getResourceBundle(),
"XtextSelectAnnotationRulerAction.", this, getVerticalRuler());
setAction(ITextEditorActionConstants.RULER_CLICK, markerAction);
actioncontributor.contributeActions(this);
}