Package org.python.pydev.django_templates.completions.templates

Examples of org.python.pydev.django_templates.completions.templates.DjTemplateCompletionProcessor


        this.htmlContentAssistProcessor = htmlContentAssistProcessor;
    }

    private DjTemplateCompletionProcessor getTemplatesContentAssistProcessor() {
        if (this.templatesContentAssistProcessor == null) {
            this.templatesContentAssistProcessor = new DjTemplateCompletionProcessor(
                    DjContextType.DJ_COMPLETIONS_CONTEXT_TYPE, PydevPlugin.getImageCache().get(
                            UIConstants.COMPLETION_TEMPLATE), false);
        }
        return this.templatesContentAssistProcessor;
    }
View Full Code Here


        return this.templatesContentAssistProcessor;
    }

    private DjTemplateCompletionProcessor getTemplatesTagsContentAssistProcessor() {
        if (this.templatesTagsContentAssistProcessor == null) {
            this.templatesTagsContentAssistProcessor = new DjTemplateCompletionProcessor(
                    DjContextType.DJ_TAGS_COMPLETIONS_CONTEXT_TYPE, null, true);
        }
        return this.templatesTagsContentAssistProcessor;
    }
View Full Code Here

        return this.templatesTagsContentAssistProcessor;
    }

    private DjTemplateCompletionProcessor getTemplatesFiltersContentAssistProcessor() {
        if (this.templatesFiltersContentAssistProcessor == null) {
            this.templatesFiltersContentAssistProcessor = new DjTemplateCompletionProcessor(
                    DjContextType.DJ_FILTERS_COMPLETIONS_CONTEXT_TYPE, null, true);
        }
        return this.templatesFiltersContentAssistProcessor;
    }
View Full Code Here

    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];
View Full Code Here

TOP

Related Classes of org.python.pydev.django_templates.completions.templates.DjTemplateCompletionProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.