return new String[] { IDocument.DEFAULT_CONTENT_TYPE };
}
@Override
public IContentAssistant getContentAssistant(final ISourceViewer sourceViewer) {
ContentAssistant assistant = new ContentAssistant();
assistant.addCompletionListener(new ICompletionListener() {
public void assistSessionStarted(ContentAssistEvent event) {
((ClojureSourceViewer) sourceViewer).setContentAssistantActive(true);
}
public void assistSessionEnded(ContentAssistEvent event) {
((ClojureSourceViewer) sourceViewer).setContentAssistantActive(false);
}
public void selectionChanged(ICompletionProposal proposal,
boolean smartToggle) { }
});
assistant.setDocumentPartitioning(ClojurePartitionScanner.CLOJURE_PARTITIONING);
assistant.setContentAssistProcessor(
(IContentAssistProcessor) proposalProcessor._("make-process", editor, assistant),
IDocument.DEFAULT_CONTENT_TYPE);
//assistant.setContentAssistProcessor(
// (IContentAssistProcessor) proposalProcessor._("make-process", editor, assistant),
// ClojurePartitionScanner.CLOJURE_COMMENT);
//assistant.setContentAssistProcessor(
// (IContentAssistProcessor) proposalProcessor._("make-process", editor, assistant),
// ClojurePartitionScanner.CLOJURE_STRING);
assistant.enableAutoActivation(this.fPreferenceStore.getBoolean(PreferenceConstants.EDITOR_CODE_COMPLETION_AUTO_ACTIVATE));
assistant.setShowEmptyList(false);
assistant.setEmptyMessage(
"No completions available. You may want to start a REPL for the"
+ " project holding this file to activate the code completion"
+ " feature.");
assistant.setStatusLineVisible(true);
assistant.setStatusMessage("no current status message");
assistant.enableAutoInsert(true);
assistant.setAutoActivationDelay(0);
assistant
.setProposalPopupOrientation(IContentAssistant.PROPOSAL_STACKED);
assistant
.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
assistant
.setInformationControlCreator(getInformationControlCreator(sourceViewer));
assistant.enableColoredLabels(true);
return assistant;
}