org.eclipse.ui.texteditor.ContentAssistAction Java Examples

The following examples show how to use org.eclipse.ui.texteditor.ContentAssistAction. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ContentAssistHandler.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
	// Due to an Handler ExtensionPoint declaration, we have an XtextEditor as Active
	// Editor so can just cast to an ITextEditor
	new ContentAssistAction(XtextUIMessages.getResourceBundle(), "ContentAssistProposal.",
			(ITextEditor) HandlerUtil.getActiveEditor(event)).run();
	return this;
}
 
Example #2
Source File: SourceEditor.java    From textuml with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createActions() {
    super.createActions();

    IAction contentAssistAction = new ContentAssistAction(Messages.RESOURCE_BUNDLE, "ContentAssistProposal.", this);
    contentAssistAction.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
    setAction("ContentAssistProposal", contentAssistAction);
    markAsStateDependentAction("ContentAssistProposal", true);
}