private ICompletionProposal[] addDjProposals(ITextViewer viewer, int offset, ICompletionProposal[] proposals) {
boolean completionsForTags = showCompletionsInsideDjangoContext(viewer.getDocument(), offset);
ICompletionProposal[] djProposals;
DjTemplateCompletionProcessor processor;
String str = extractPrefix(viewer, offset);
if (completionsForTags) {
if (str.startsWith("|")) {
processor = this.getTemplatesFiltersContentAssistProcessor();
str = str.substring(1);
} else {
processor = this.getTemplatesTagsContentAssistProcessor();
}
} else {
processor = this.getTemplatesContentAssistProcessor();
}
djProposals = processor.computeCompletionProposals(viewer, offset);
ArrayList<ICompletionProposal> djProposalsList = new ArrayList<ICompletionProposal>();
for (int j = 0; j < djProposals.length; j++) {
if (djProposals[j].getDisplayString().startsWith(str)) {
ICompletionProposal p = djProposals[j];