[Pydev-cvs] org.python.pydev.parser/src/org/python/pydev/parser/visitors NodeUtils.java,1.29,1.30
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-05-18 17:34:04
|
Update of /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/visitors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5073/src/org/python/pydev/parser/visitors Modified Files: NodeUtils.java Log Message: Index: NodeUtils.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.parser/src/org/python/pydev/parser/visitors/NodeUtils.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** NodeUtils.java 3 May 2006 15:54:00 -0000 1.29 --- NodeUtils.java 18 May 2006 17:33:55 -0000 1.30 *************** *** 525,528 **** --- 525,549 ---- } + + public static NameTok getNameForAlias(aliasType t) { + if(t.asname != null){ + return (NameTok) t.asname; + }else{ + return (NameTok) t.name; + } + } + + + public static NameTok getNameForRep(aliasType[] names, String representation) { + for (aliasType name : names) { + NameTok nameForAlias = getNameForAlias(name); + String aliasRep = NodeUtils.getRepresentationString(nameForAlias); + if(representation.equals(aliasRep)){ + return nameForAlias; + } + } + return null; + } + |