Package org.python.pydev.editor.codecompletion.revisited.visitors

Examples of org.python.pydev.editor.codecompletion.revisited.visitors.FindDefinitionModelVisitor


                                    value = d.value;

                                } else if (d.ast instanceof Name) {
                                    ClassDef classDef = (ClassDef) d.scope.getClassDef();
                                    if (classDef != null) {
                                        FindDefinitionModelVisitor visitor = new FindDefinitionModelVisitor(
                                                actToks.get(actToksLen - 1), d.line, d.col, d.module);
                                        try {
                                            classDef.accept(visitor);
                                        } catch (StopVisitingException e) {
                                            //expected exception
View Full Code Here


     * @return a find definition scope visitor that has already found some definition
     */
    @SuppressWarnings("unchecked")
    private FindDefinitionModelVisitor getFindDefinitionsScopeVisitor(String rep, int line, int col) throws Exception {
        Tuple3 key = new Tuple3(rep, line, col);
        FindDefinitionModelVisitor visitor = this.findDefinitionVisitorCache.getObj(key);
        if (visitor == null) {
            visitor = new FindDefinitionModelVisitor(rep, line, col, this);
            if (ast != null) {
                try {
                    ast.accept(visitor);
                } catch (StopVisitingException e) {
                    //expected exception
View Full Code Here

        //first thing is finding its scope
        FindScopeVisitor scopeVisitor = getScopeVisitor(line, col);

        //this visitor checks for assigns for the token
        FindDefinitionModelVisitor visitor = getFindDefinitionsScopeVisitor(actTok, line, col);

        List<Definition> defs = visitor.definitions;
        int size = defs.size();
        if (size > 0) {
            //ok, it is an assign, so, let's get it
View Full Code Here

TOP

Related Classes of org.python.pydev.editor.codecompletion.revisited.visitors.FindDefinitionModelVisitor

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.