Examples of PythonNatureStub


Examples of org.python.pydev.parser.PythonNatureStub

                super.visitChangedResource(resource, document, monitor);
                changed.add(resource);
            }
        };
        ProjectMock project = new ProjectMock();
        project.setNature(new PythonNatureStub());

        FolderMock mod1 = new FolderMock("mod1");
        FileMock initFromMod1 = new FileMock("__init__.py"); //visited

        mod1.addMember(initFromMod1);
View Full Code Here

Examples of org.python.pydev.refactoring.tests.adapter.PythonNatureStub

    }

    private MockupGeneratePropertiesRequestProcessor setupRequestProcessor(MockupGeneratePropertiesConfig config)
            throws Throwable {
        ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source),
                new PythonNatureStub(), createVersionProvider());
        List<IClassDefAdapter> classes = module.getClasses();
        assertTrue(classes.size() > 0);

        MockupGeneratePropertiesRequestProcessor requestProcessor = new MockupGeneratePropertiesRequestProcessor(
                module, config);
View Full Code Here

Examples of org.python.pydev.refactoring.tests.adapter.PythonNatureStub

    @Override
    public void runTest() throws Throwable {
        StringBuffer buffer = new StringBuffer();
        ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source),
                new PythonNatureStub(), createVersionProvider());
        ClassDefVisitor visitor = VisitorFactory.createContextVisitor(ClassDefVisitor.class, module.getASTNode(),
                module, module);
        Iterator<IClassDefAdapter> iter = visitor.iterator();

        buffer.append("# " + visitor.getAll().size() + "\n");
View Full Code Here

Examples of org.python.pydev.refactoring.tests.adapter.PythonNatureStub

    @Override
    public void runTest() throws Throwable {
        StringBuffer buffer = new StringBuffer();
        ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source),
                new PythonNatureStub(), createVersionProvider());
        ClassDefVisitor classVisitor = VisitorFactory.createContextVisitor(ClassDefVisitor.class, module.getASTNode(),
                module, module);

        assertTrue(classVisitor.getAll().size() > 0);
        ClassDefAdapter classDefAdapter = (ClassDefAdapter) classVisitor.getAll().get(0);
View Full Code Here

Examples of org.python.pydev.refactoring.tests.adapter.PythonNatureStub

        IDocument doc = new Document(data.source);
        Module astModule = VisitorFactory.getRootNode(doc, createVersionProvider());
        String name = data.file.getName();
        name = name.substring(0, name.length() - EXTENSION);
        ModuleAdapter module = new ModuleAdapter(null, data.file, doc, astModule, new PythonNatureStub());

        if (data.sourceSelection == null) {
            System.out.println("here");
        }
        ITextSelection selection = new TextSelection(doc, data.sourceSelection.getOffset(),
View Full Code Here

Examples of org.python.pydev.refactoring.tests.adapter.PythonNatureStub

    @Override
    public void runTest() throws Throwable {
        StringBuffer buffer = new StringBuffer();
        ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source),
                new PythonNatureStub(), createVersionProvider());
        GlobalAttributeVisitor globalVisitor = VisitorFactory.createContextVisitor(GlobalAttributeVisitor.class,
                module.getASTNode(), module, module);
        ClassDefVisitor classVisitor = VisitorFactory.createContextVisitor(ClassDefVisitor.class, module.getASTNode(),
                module, module);
        assertTrue(classVisitor.getAll().size() > 0);
View Full Code Here

Examples of org.python.pydev.refactoring.tests.adapter.PythonNatureStub

    @Override
    public void runTest() throws Throwable {
        StringBuffer buffer = new StringBuffer();
        ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source),
                new PythonNatureStub(), createVersionProvider());

        for (FunctionDefAdapter func : module.getFunctions()) {

            ScopeVariablesVisitor visitor = VisitorFactory.createContextVisitor(ScopeVariablesVisitor.class,
                    func.getASTNode(), module, func);
View Full Code Here

Examples of org.python.pydev.refactoring.tests.adapter.PythonNatureStub

    @Override
    public void runTest() throws Throwable {
        StringBuffer buffer = new StringBuffer();
        ModuleAdapter module = VisitorFactory.createModuleAdapter(null, null, new Document(data.source),
                new PythonNatureStub(), createVersionProvider());
        ScopeAssignedVisitor visitor = VisitorFactory.createContextVisitor(ScopeAssignedVisitor.class,
                module.getASTNode(), module, module);

        assertTrue(visitor.getAll().size() > 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.