Search in sources :

Example 1 with QuickAssistAssistant

use of org.eclipse.jface.text.quickassist.QuickAssistAssistant in project bndtools by bndtools.

the class BndSourceViewerConfiguration method getQuickAssistAssistant.

@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    QuickAssistAssistant assistant = new QuickAssistAssistant();
    assistant.setQuickAssistProcessor(new BndMarkerQuickAssistProcessor());
    return assistant;
}
Also used : IQuickAssistAssistant(org.eclipse.jface.text.quickassist.IQuickAssistAssistant) QuickAssistAssistant(org.eclipse.jface.text.quickassist.QuickAssistAssistant) BndMarkerQuickAssistProcessor(org.bndtools.core.editors.BndMarkerQuickAssistProcessor)

Example 2 with QuickAssistAssistant

use of org.eclipse.jface.text.quickassist.QuickAssistAssistant in project bndtools by bndtools.

the class PackageInfoSourceViewerConfiguration method getQuickAssistAssistant.

@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    QuickAssistAssistant assistant = new QuickAssistAssistant();
    assistant.setQuickAssistProcessor(new BndMarkerQuickAssistProcessor());
    return assistant;
}
Also used : IQuickAssistAssistant(org.eclipse.jface.text.quickassist.IQuickAssistAssistant) QuickAssistAssistant(org.eclipse.jface.text.quickassist.QuickAssistAssistant) BndMarkerQuickAssistProcessor(org.bndtools.core.editors.BndMarkerQuickAssistProcessor)

Example 3 with QuickAssistAssistant

use of org.eclipse.jface.text.quickassist.QuickAssistAssistant in project eclipse.platform.text by eclipse.

the class ExtensionBasedTextViewerConfiguration method getQuickAssistAssistant.

@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    QuickAssistAssistant quickAssistAssistant = new QuickAssistAssistant();
    CompositeQuickAssistProcessor processor = new CompositeQuickAssistProcessor(Arrays.asList(new MarkerResoltionQuickAssistProcessor(), new SpellingCorrectionProcessor()));
    quickAssistAssistant.setQuickAssistProcessor(processor);
    // $NON-NLS-1$
    quickAssistAssistant.setRestoreCompletionProposalSize(EditorsPlugin.getDefault().getDialogSettingsSection("quick_assist_proposal_size"));
    quickAssistAssistant.setInformationControlCreator(parent -> new DefaultInformationControl(parent, EditorsPlugin.getAdditionalInfoAffordanceString()));
    return quickAssistAssistant;
}
Also used : MarkerResoltionQuickAssistProcessor(org.eclipse.ui.internal.genericeditor.markers.MarkerResoltionQuickAssistProcessor) DefaultInformationControl(org.eclipse.jface.text.DefaultInformationControl) SpellingCorrectionProcessor(org.eclipse.ui.texteditor.spelling.SpellingCorrectionProcessor) QuickAssistAssistant(org.eclipse.jface.text.quickassist.QuickAssistAssistant) IQuickAssistAssistant(org.eclipse.jface.text.quickassist.IQuickAssistAssistant)

Example 4 with QuickAssistAssistant

use of org.eclipse.jface.text.quickassist.QuickAssistAssistant in project KaiZen-OpenAPI-Editor by RepreZen.

the class JsonSourceViewerConfiguration method getQuickAssistAssistant.

@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    QuickAssistAssistant assistant = new QuickAssistAssistant();
    assistant.setQuickAssistProcessor(new JsonQuickAssistProcessor(new QuickFixer()));
    assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
    return assistant;
}
Also used : JsonQuickAssistProcessor(com.reprezen.swagedit.core.assist.JsonQuickAssistProcessor) QuickAssistAssistant(org.eclipse.jface.text.quickassist.QuickAssistAssistant) IQuickAssistAssistant(org.eclipse.jface.text.quickassist.IQuickAssistAssistant) QuickFixer(com.reprezen.swagedit.core.quickfix.QuickFixer)

Example 5 with QuickAssistAssistant

use of org.eclipse.jface.text.quickassist.QuickAssistAssistant in project eclipse.platform.text by eclipse.

the class TextSourceViewerConfiguration method getQuickAssistAssistant.

@Override
public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
    if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
        return null;
    QuickAssistAssistant assistant = new QuickAssistAssistant();
    assistant.setQuickAssistProcessor(new SpellingCorrectionProcessor());
    // $NON-NLS-1$
    assistant.setRestoreCompletionProposalSize(EditorsPlugin.getDefault().getDialogSettingsSection("quick_assist_proposal_size"));
    assistant.setInformationControlCreator(getQuickAssistAssistantInformationControlCreator());
    return assistant;
}
Also used : SpellingCorrectionProcessor(org.eclipse.ui.texteditor.spelling.SpellingCorrectionProcessor) QuickAssistAssistant(org.eclipse.jface.text.quickassist.QuickAssistAssistant) IQuickAssistAssistant(org.eclipse.jface.text.quickassist.IQuickAssistAssistant)

Aggregations

IQuickAssistAssistant (org.eclipse.jface.text.quickassist.IQuickAssistAssistant)5 QuickAssistAssistant (org.eclipse.jface.text.quickassist.QuickAssistAssistant)5 BndMarkerQuickAssistProcessor (org.bndtools.core.editors.BndMarkerQuickAssistProcessor)2 SpellingCorrectionProcessor (org.eclipse.ui.texteditor.spelling.SpellingCorrectionProcessor)2 JsonQuickAssistProcessor (com.reprezen.swagedit.core.assist.JsonQuickAssistProcessor)1 QuickFixer (com.reprezen.swagedit.core.quickfix.QuickFixer)1 DefaultInformationControl (org.eclipse.jface.text.DefaultInformationControl)1 MarkerResoltionQuickAssistProcessor (org.eclipse.ui.internal.genericeditor.markers.MarkerResoltionQuickAssistProcessor)1