[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/actions PySelection.java,1.1,1.2
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2004-07-16 15:36:14
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4676/src/org/python/pydev/editor/actions Modified Files: PySelection.java Log Message: Minor changes. Index: PySelection.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions/PySelection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PySelection.java 21 Jun 2004 21:36:29 -0000 1.1 --- PySelection.java 16 Jul 2004 15:36:04 -0000 1.2 *************** *** 40,43 **** --- 40,45 ---- /* Original cursor line */ public int cursorLine; + /* Text editor */ + public ITextEditor textEditor; /** *************** *** 70,79 **** textEditor.getDocumentProvider().getDocument( textEditor.getEditorInput()); ! // Grab the selection ! ITextSelection selection = ! (ITextSelection) textEditor ! .getSelectionProvider() ! .getSelection(); // Set data --- 72,78 ---- textEditor.getDocumentProvider().getDocument( textEditor.getEditorInput()); ! this.textEditor = textEditor; // Grab the selection ! ITextSelection selection = getITextSelection(); // Set data *************** *** 98,101 **** --- 97,111 ---- /** + * @param textEditor + * @return + */ + public ITextSelection getITextSelection() { + return (ITextSelection) textEditor + .getSelectionProvider() + .getSelection(); + } + + + /** * Alt constructor for PySelection. Takes in a document, starting line, ending line, and * length of selection, as well as a boolean indicating how to handle an empty selection. *************** *** 135,141 **** endLineIndex = 0; selLength = 0; - selection = new String ( ); selection = ""; - endLineDelim = new String ( ); endLineDelim = ""; startLine = null; --- 145,149 ---- *************** *** 252,256 **** /** ! * Gets cursor offset to go to. * * @return int Offset to put cursor at --- 260,264 ---- /** ! * Gets cursor offset within a line. * * @return int Offset to put cursor at |