Logo Search packages:      
Sourcecode: eclipse-pydev version File versions  Download package

org::python::pydev::editor::codecompletion::revisited::visitors::HeuristicFindAttrs Class Reference

Inheritance diagram for org::python::pydev::editor::codecompletion::revisited::visitors::HeuristicFindAttrs:

org::python::pydev::editor::codecompletion::revisited::visitors::AbstractVisitor

List of all members.


Detailed Description

This class defines how we should find attributes.

Heuristics provided allow someone to find an attr inside a function definition (IN_INIT or IN_ANY) or inside a method call (e.g. a method called properties.create(x=0) - that's what I use, so, that's specific). Other uses may be customized later, once we know which other uses are done.

Author:
Fabio Zadrozny

Definition at line 26 of file HeuristicFindAttrs.java.


Public Member Functions

List< ITokengetTokens ()
 HeuristicFindAttrs (int where, int how, String methodCall)
void traverse (SimpleNode node) throws Exception
Object visitAssert (Assert node) throws Exception
Object visitAssign (Assign node) throws Exception
Object visitAttribute (Attribute node) throws Exception
Object visitAugAssign (AugAssign node) throws Exception
Object visitBinOp (BinOp node) throws Exception
Object visitBoolOp (BoolOp node) throws Exception
Object visitBreak (Break node) throws Exception
Object visitCall (Call node) throws Exception
Object visitClassDef (ClassDef node) throws Exception
Object visitCompare (Compare node) throws Exception
Object visitComprehension (Comprehension node) throws Exception
Object visitContinue (Continue node) throws Exception
Object visitDelete (Delete node) throws Exception
Object visitDict (Dict node) throws Exception
Object visitEllipsis (Ellipsis node) throws Exception
Object visitExec (Exec node) throws Exception
Object visitExpr (Expr node) throws Exception
Object visitExpression (Expression node) throws Exception
Object visitExtSlice (ExtSlice node) throws Exception
Object visitFor (For node) throws Exception
Object visitFunctionDef (FunctionDef node) throws Exception
Object visitGeneratorExp (GeneratorExp node) throws Exception
Object visitGlobal (Global node) throws Exception
Object visitIf (If node) throws Exception
Object visitImport (Import node) throws Exception
Object visitImportFrom (ImportFrom node) throws Exception
Object visitIndex (Index node) throws Exception
Object visitInteractive (Interactive node) throws Exception
Object visitLambda (Lambda node) throws Exception
Object visitList (List node) throws Exception
Object visitListComp (ListComp node) throws Exception
Object visitModule (Module node) throws Exception
Object visitName (Name node) throws Exception
Object visitNameTok (NameTok node) throws Exception
Object visitNum (Num node) throws Exception
Object visitPass (Pass node) throws Exception
Object visitPrint (Print node) throws Exception
Object visitRaise (Raise node) throws Exception
Object visitRepr (Repr node) throws Exception
Object visitReturn (Return node) throws Exception
Object visitSlice (Slice node) throws Exception
Object visitStr (Str node) throws Exception
Object visitStrJoin (StrJoin node) throws Exception
Object visitSubscript (Subscript node) throws Exception
Object visitSuite (Suite node) throws Exception
Object visitTryExcept (TryExcept node) throws Exception
Object visitTryFinally (TryFinally node) throws Exception
Object visitTuple (Tuple node) throws Exception
Object visitUnaryOp (UnaryOp node) throws Exception
Object visitWhile (While node) throws Exception
Object visitYield (Yield node) throws Exception

Static Public Member Functions

static IToken[] getTokens (SimpleNode ast, int which, String moduleName)
static boolean isAliasImport (ImportFrom node)
static boolean isIfMAinNode (If node)
static boolean isWildImport (ImportFrom node)
static boolean isWildImport (IToken generator)
static boolean isWildImport (SimpleNode node)
static SourceToken makeFullNameToken (SimpleNode node, String moduleName)
static List< ITokenmakeImportToken (ImportFrom node, List< IToken > tokens, String moduleName, boolean allowForMultiple)
static List< ITokenmakeImportToken (Import node, List< IToken > tokens, String moduleName, boolean allowForMultiple)
static List< ITokenmakeImportToken (SimpleNode node, List< IToken > tokens, String moduleName, boolean allowForMultiple)
static SourceToken makeToken (SimpleNode node, String moduleName)
static IToken makeWildImportToken (ImportFrom node, List< IToken > tokens, String moduleName)

Public Attributes

int how = -1
String methodCall = ""
int where = -1

Static Public Attributes

static final int ALIAS_MODULES = 3
static final int GLOBAL_TOKENS = 1
static final int IN_ASSIGN = 0
static final int IN_KEYWORDS = 1
static final int INNER_DEFS = 5
static final int MODULE_DOCSTRING = 4
static final int WHITIN_ANY = 2
static final int WHITIN_INIT = 1
static final int WHITIN_METHOD_CALL = 0
static final int WILD_MODULES = 2

Protected Member Functions

void addToken (SimpleNode node)
Object unhandled_node (SimpleNode node) throws Exception

Protected Attributes

String moduleName
List< ITokentokens = new ArrayList<IToken>()

Private Attributes

boolean entryPointCorrect = false
boolean inAssing = false
boolean inFuncDef = false

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index