Package org.python.pydev.editor.codecompletion.templates

Examples of org.python.pydev.editor.codecompletion.templates.PyDocumentTemplateContext


        Template template = selectedTemplate.getTemplate();

        PyEdit pyEdit = (PyEdit) openEditor;
        Region region = new Region(0, 0);
        PyDocumentTemplateContext context = PyTemplateCompletionProcessor.createContext(new PyContextType(),
                pyEdit.getPySourceViewer(), region);

        TemplateProposal templateProposal = new TemplateProposal(template, context, region, null);
        templateProposal.apply(pyEdit.getPySourceViewer(), '\n', 0, 0);
    }
View Full Code Here


        }

        if (targetEditor != null) {
            String creationStr = getCreationStr();
            Region region = new Region(offset, len);
            PyDocumentTemplateContext context = PyTemplateCompletionProcessor.createContext(new PyContextType(),
                    targetEditor.getPySourceViewer(), region, indent);

            Template template = new Template("Create " + creationStr, "Create " + creationStr, "", source, true);
            TemplateProposal templateProposal = new TemplateProposal(template, context, region, null);
            return templateProposal;
View Full Code Here

TOP

Related Classes of org.python.pydev.editor.codecompletion.templates.PyDocumentTemplateContext

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.