Search in sources :

Example 1 with JsonContentAssistProcessor

use of com.reprezen.swagedit.core.assist.JsonContentAssistProcessor in project KaiZen-OpenAPI-Editor by RepreZen.

the class JsonSourceViewerConfiguration method getContentAssistant.

@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
    ContentAssistant ca = new ContentAssistant();
    JsonContentAssistProcessor processor = createContentAssistProcessor(ca);
    ca.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
    ca.setInformationControlCreator(getInformationControlCreator(sourceViewer));
    ca.enableAutoInsert(false);
    ca.enablePrefixCompletion(false);
    ca.enableAutoActivation(true);
    ca.setAutoActivationDelay(100);
    ca.enableColoredLabels(true);
    ca.setShowEmptyList(true);
    ca.setRepeatedInvocationMode(true);
    ca.addCompletionListener(processor);
    ca.setStatusLineVisible(true);
    return ca;
}
Also used : JsonContentAssistProcessor(com.reprezen.swagedit.core.assist.JsonContentAssistProcessor) IContentAssistant(org.eclipse.jface.text.contentassist.IContentAssistant) ContentAssistant(org.eclipse.jface.text.contentassist.ContentAssistant)

Aggregations

JsonContentAssistProcessor (com.reprezen.swagedit.core.assist.JsonContentAssistProcessor)1 ContentAssistant (org.eclipse.jface.text.contentassist.ContentAssistant)1 IContentAssistant (org.eclipse.jface.text.contentassist.IContentAssistant)1