use of eu.esdihumboldt.hale.ui.util.groovy.internal.contentassist.GroovyASTCompletionProcessor in project hale by halestudio.
the class SimpleGroovySourceViewerConfiguration method getContentAssistant.
/*
* @see SourceViewerConfiguration#getContentAssistant(ISourceViewer)
*/
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
// if (getEditor() != null) {
//
ContentAssistant assistant = new ContentAssistant();
assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
assistant.enableColoredLabels(true);
IContentAssistProcessor testProcessor = new GroovyASTCompletionProcessor(fCustomCompletions);
assistant.setContentAssistProcessor(testProcessor, IDocument.DEFAULT_CONTENT_TYPE);
// assistant.setRestoreCompletionProposalSize(getSettings("completion_proposal_size")); //$NON-NLS-1$
//
// IContentAssistProcessor javaProcessor= new JavaCompletionProcessor(getEditor(), assistant, IDocument.DEFAULT_CONTENT_TYPE);
// assistant.setContentAssistProcessor(javaProcessor, IDocument.DEFAULT_CONTENT_TYPE);
//
// ContentAssistProcessor singleLineProcessor= new JavaCompletionProcessor(getEditor(), assistant, IJavaPartitions.JAVA_SINGLE_LINE_COMMENT);
// assistant.setContentAssistProcessor(singleLineProcessor, IJavaPartitions.JAVA_SINGLE_LINE_COMMENT);
//
// ContentAssistProcessor stringProcessor= new JavaCompletionProcessor(getEditor(), assistant, IJavaPartitions.JAVA_STRING);
// assistant.setContentAssistProcessor(stringProcessor, IJavaPartitions.JAVA_STRING);
//
// ContentAssistProcessor multiLineProcessor= new JavaCompletionProcessor(getEditor(), assistant, IJavaPartitions.JAVA_MULTI_LINE_COMMENT);
// assistant.setContentAssistProcessor(multiLineProcessor, IJavaPartitions.JAVA_MULTI_LINE_COMMENT);
//
// ContentAssistProcessor javadocProcessor= new JavadocCompletionProcessor(getEditor(), assistant);
// assistant.setContentAssistProcessor(javadocProcessor, IJavaPartitions.JAVA_DOC);
//
// ContentAssistPreference.configure(assistant, fPreferenceStore);
//
// assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
// set how to show "additional information" in a completion proposal
assistant.setInformationControlCreator(new IInformationControlCreator() {
@Override
public IInformationControl createInformationControl(Shell parent) {
return new DefaultInformationControl(parent, true);
}
});
return assistant;
// }
// return null;
}
Aggregations