Hi what about filing an enhancement request. never the less ...
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.texteditor.FindReplaceAction;
import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorActions;
import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorMessages;
import com.google.inject.Inject;
public class MyDslEmbeddedEditorActions extends EmbeddedEditorActions {
public static class Factory extends EmbeddedEditorActions.Factory {
@Inject(optional=true)
protected IWorkbench workbench;
protected EmbeddedEditorActions createActions(ISourceViewer viewer) {
return new MyDslEmbeddedEditorActions(viewer, workbench);
}
}
public MyDslEmbeddedEditorActions(ISourceViewer viewer, IWorkbench workbench) {
super(viewer, workbench);
}
@Override
protected void createActions() {
super.createActions();
FindReplaceAction action= new FindReplaceAction(EmbeddedEditorMessages.getBundleForConstructedKeys(), "DontCare.", workbench.getActiveWorkbenchWindow().getShell(), viewer.getFindReplaceTarget()); //$NON-NLS-1$
//action.setHelpContextId(IAbstractTextEditorHelpContextIds.QUICK_ASSIST_ACTION);
action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE);
setAction(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE, action);
}
}
// In the UI Module ...
public Class<? extends EmbeddedEditorActions.Factory> bindEmbeddedEditorActions$Factory() {
return MyDslEmbeddedEditorActions.Factory.class;
}
[Updated on: Wed, 05 February 2014 19:52]
Report message to a moderator