[Pydev-cvs] org.python.pydev/src/org/python/pydev/outline OutlineLinkWithEditorAction.java, 1.1, 1.
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2007-05-06 17:58:17
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/outline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15626/src/org/python/pydev/outline Modified Files: OutlineLinkWithEditorAction.java Log Message: Minor Index: OutlineLinkWithEditorAction.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/outline/OutlineLinkWithEditorAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OutlineLinkWithEditorAction.java 6 May 2007 14:29:17 -0000 1.1 --- OutlineLinkWithEditorAction.java 6 May 2007 17:58:12 -0000 1.2 *************** *** 126,147 **** */ private StructuredSelection getSelectionPosition(ParsedItem r, ITextSelection t) { ! ArrayList<ParsedItem> sel = new ArrayList<ParsedItem>(); ! ! if (r != null) { ! do { ! ParsedItem item = findSel(r, t.getStartLine() + 1); ! if (item != null) { ! sel.add(item); ! } ! r = item; ! } while (r != null); ! } ! TreePath treePath = null; ! if (sel != null) { ! treePath = new TreePath(sel.toArray()); ! } ! if (treePath != null) { ! return new TreeSelection(treePath); ! } return null; } --- 126,151 ---- */ private StructuredSelection getSelectionPosition(ParsedItem r, ITextSelection t) { ! try { ! ArrayList<ParsedItem> sel = new ArrayList<ParsedItem>(); ! ! if (r != null) { ! do { ! ParsedItem item = findSel(r, t.getStartLine() + 1); ! if (item != null) { ! sel.add(item); ! } ! r = item; ! } while (r != null); ! } ! TreePath treePath = null; ! if (sel != null && sel.size() > 0) { ! treePath = new TreePath(sel.toArray()); ! } ! if (treePath != null) { ! return new TreeSelection(treePath); ! } ! } catch (Exception e) { ! PydevPlugin.log(e); ! } return null; } |