return formatter;
}
@Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant = new ContentAssistant();
// default templates
assistant.setContentAssistProcessor(new DjangoTagCompletionProcessor(), IDocument.DEFAULT_CONTENT_TYPE);
assistant.setContentAssistProcessor(new DjangoFilterCompletionProcessor(), IDjangoPartitions.DJANGO_VARIABLE);
assistant.setContentAssistProcessor(new DjangoFilterCompletionProcessor(), IDjangoPartitions.DJANGO_TAG);
// assistant.setContentAssistProcessor(new DjangoTagCompletionProcessor(), IDjangoPartitions.DJANGO_TAG);
assistant.setContentAssistProcessor(new DjangoTagCompletionProcessor(), IDjangoPartitions.HTML_TAG);
assistant.setContentAssistProcessor(new DjangoTagCompletionProcessor(), IDjangoPartitions.JAVA_SCRIPT);
assistant.setContentAssistProcessor(new DjangoTagCompletionProcessor(), IDjangoPartitions.HTML_CSS);
// // display Django keywords
// assistant.setContentAssistProcessor(new DjangoCompletionProcessor(IDjangoPartitions.DJANGO_TAG),
// IDocument.DEFAULT_CONTENT_TYPE);
//
// // display Django filters
// assistant.setContentAssistProcessor(new DjangoCompletionProcessor(IDjangoPartitions.DJANGO_VARIABLE),
// IDjangoPartitions.DJANGO_VARIABLE);
assistant.enableAutoInsert(true);
assistant.enableAutoActivation(true);
assistant.setAutoActivationDelay(100);
//assistant.enableColoredLabels(true);
//assistant.setProposalPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
//assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
//assistant.setContextInformationPopupBackground(colorProvider.getColor(new RGB(0, 0, 0)));
//assistant.setDocumentPartitioning(IDjangoPartitions.CONFIGURED_CONTENT_TYPES);
assistant.setProposalSelectorBackground(colorProvider.getColor(new RGB(255, 255, 225)));
return assistant;
}