[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/model AbstractNode.java,1.3,1.4 ModelUtils.
Brought to you by:
fabioz
From: Aleksandar T. <at...@us...> - 2004-04-27 01:07:09
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32709/src/org/python/pydev/editor/model Modified Files: AbstractNode.java ModelUtils.java Location.java package.html Scope.java Log Message: Minor bug fixes: - model elements take a better guess where they are with tabs - OpenAction worker method got refactored into PydevPlugin Index: Scope.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model/Scope.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Scope.java 22 Apr 2004 10:35:22 -0000 1.3 --- Scope.java 27 Apr 2004 01:06:58 -0000 1.4 *************** *** 104,109 **** /** ! * @param name: function name ! * @param c: comparator to test for. * @return an ArrayList of AbstractNode to the function/class definitions. * each returned item will test as equal in c.compare(token, item); --- 104,109 ---- /** ! * @param token : function name ! * @param c : comparator to test for. * @return an ArrayList of AbstractNode to the function/class definitions. * each returned item will test as equal in c.compare(token, item); *************** *** 144,148 **** /** * get all the import files ! * @param startingPoint: a file to start searching from * @return an ordered ArrayList of File of all import paths for the project. */ --- 144,148 ---- /** * get all the import files ! * @param startingPoint : a file to start searching from * @return an ordered ArrayList of File of all import paths for the project. */ Index: package.html =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model/package.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** package.html 10 Apr 2004 01:48:13 -0000 1.1 --- package.html 27 Apr 2004 01:06:58 -0000 1.2 *************** *** 2,10 **** The model represents the structure of the python file. ! <p>{@link org.python.pydev.model.ModelMaker ModelMaker} creates the model from AST by traversing the tree. ! <p>{@link org.python.pydev.model.ModelUtils ModelUtils} have various utility functions for model traversal, etc. ! <p>{@link org.python.pydev.model.AbstractNode AbstractNode} is the main node API. Subclasses modify it as needed. See ClassNode, FunctionCallNode, etc... --- 2,10 ---- The model represents the structure of the python file. ! <p>{@link ModelMaker ModelMaker} creates the model from AST by traversing the tree. ! <p>{@link ModelUtils} have various utility functions for model traversal, etc. ! <p>{@link org.python.pydev.editor.model.AbstractNode AbstractNode} is the main node API. Subclasses modify it as needed. See ClassNode, FunctionCallNode, etc... Index: Location.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model/Location.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Location.java 10 Apr 2004 01:48:13 -0000 1.1 --- Location.java 27 Apr 2004 01:06:58 -0000 1.2 *************** *** 39,45 **** /** ! * @param location ! * @param location2 ! * @return */ public boolean contained(Location start, Location end) { --- 39,43 ---- /** ! * @return true if location is completely enclosed between start & end. */ public boolean contained(Location start, Location end) { Index: AbstractNode.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model/AbstractNode.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractNode.java 22 Apr 2004 10:35:22 -0000 1.3 --- AbstractNode.java 27 Apr 2004 01:06:58 -0000 1.4 *************** *** 120,131 **** public void fixColumnLocation(Location loc, String lineText) { int where = 0; - int tabCount = 0; where = lineText.indexOf("\t", where); while (where != -1 && where <= loc.column) { where = lineText.indexOf("\t", where+1); ! tabCount++; } - if (tabCount > 0) - loc.column = loc.column - tabCount * 7; if (loc.column < 0) { loc.column = 0; --- 120,128 ---- public void fixColumnLocation(Location loc, String lineText) { int where = 0; where = lineText.indexOf("\t", where); while (where != -1 && where <= loc.column) { where = lineText.indexOf("\t", where+1); ! loc.column -= 7; } if (loc.column < 0) { loc.column = 0; Index: ModelUtils.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/model/ModelUtils.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ModelUtils.java 22 Apr 2004 10:35:22 -0000 1.3 --- ModelUtils.java 27 Apr 2004 01:06:58 -0000 1.4 *************** *** 52,59 **** /** * Depth-first search for a node that spans given location. ! * @param root: node to start the search with ! * @param loc: location we are looking for ! * @param properties: properties node must match. Pass in PROP_ANY for all nodes ! * @return */ public static AbstractNode getElement(AbstractNode root, Location loc, int properties) { --- 52,58 ---- /** * Depth-first search for a node that spans given location. ! * @param root : node to start the search with ! * @param loc : location we are looking for ! * @param properties : properties node must match. Pass in PROP_ANY for all nodes */ public static AbstractNode getElement(AbstractNode root, Location loc, int properties) { *************** *** 123,127 **** * and each parent is smaller than its children. * The siblings after me are greater, the ones before are smaller - * @return */ public static AbstractNode getPreviousNode(AbstractNode node) { --- 122,125 ---- |