org.eclipse.jface.text.quickassist.IQuickAssistAssistant Java Examples

The following examples show how to use org.eclipse.jface.text.quickassist.IQuickAssistAssistant. 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: PyEditConfiguration.java    From Pydev with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    // create a content assistant:
    PyCorrectionAssistant assistant = new PyCorrectionAssistant();

    // next create a content assistant processor to populate the completions window
    IQuickAssistProcessor processor = new PythonCorrectionProcessor(this.getEdit());

    // Correction assist works on all
    assistant.setQuickAssistProcessor(processor);
    assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));

    //delay and auto activate set on PyContentAssistant constructor.

    return assistant;
}
 
Example #2
Source File: XtextSourceViewerConfiguration.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    if (sourceViewer.isEditable()) {
        if (quickAssistant == null)
            quickAssistant = quickAssistAssistentProvider.get();
        return quickAssistant;
    }
    return null;
}
 
Example #3
Source File: JsonSourceViewerConfiguration.java    From KaiZen-OpenAPI-Editor with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    QuickAssistAssistant assistant = new QuickAssistAssistant();
    assistant.setQuickAssistProcessor(new JsonQuickAssistProcessor());
    assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
    return assistant;
}
 
Example #4
Source File: JavaSourceViewerConfiguration.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
	if (getEditor() != null) {
		JavaCorrectionAssistant assistant= new JavaCorrectionAssistant(getEditor());
		assistant.setRestoreCompletionProposalSize(getSettings("quick_assist_proposal_size")); //$NON-NLS-1$
		return assistant;
	}
	return null;
}
 
Example #5
Source File: PropertiesFileSourceViewerConfiguration.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
	if (getEditor() != null) {
		PropertiesCorrectionAssistant assistant= new PropertiesCorrectionAssistant(getEditor());
		assistant.setRestoreCompletionProposalSize(JavaPlugin.getDefault().getDialogSettingsSection("quick_assist_proposal_size")); //$NON-NLS-1$
		return assistant;
	}
	return null;
}
 
Example #6
Source File: ScriptConsoleViewer.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
public IQuickAssistAssistant getQuickFixContentAssist() {
    return fQuickAssistAssistant;
}
 
Example #7
Source File: PydevScriptConsoleSourceViewerConfiguration.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
public PydevScriptConsoleSourceViewerConfiguration(ITextHover hover, PyContentAssistant contentAssist,
        IQuickAssistAssistant quickAssist) {
    this.hover = hover;
    this.contentAssist = contentAssist;
    this.quickAssist = quickAssist;
}
 
Example #8
Source File: PydevScriptConsoleSourceViewerConfiguration.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    quickAssist.setInformationControlCreator(this.getInformationControlCreator(sourceViewer));
    return quickAssist;
}
 
Example #9
Source File: ScriptConsoleViewerWrapper.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
public IQuickAssistAssistant getQuickAssistAssistant() {
    return viewer.getQuickAssistAssistant();
}