[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/refactoring PyRefactoring.java,1.7,1.8
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2004-10-19 19:34:59
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/refactoring In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv958/src/org/python/pydev/editor/refactoring Modified Files: PyRefactoring.java Log Message: inline and extract local variable refactorings added. Index: PyRefactoring.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/refactoring/PyRefactoring.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PyRefactoring.java 13 Oct 2004 19:52:52 -0000 1.7 --- PyRefactoring.java 19 Oct 2004 19:34:47 -0000 1.8 *************** *** 185,188 **** --- 185,237 ---- } + /** + * @param editorFile + * @param beginLine + * @param beginCol + * @param operation + * @return + */ + public String inlineLocalVariable(File editorFile, int beginLine, int beginCol, Operation operation) { + String s = "@@BIKE"; + s+= "inlineLocalVariable"; + s+= " "+editorFile.getAbsolutePath(); + s+= " "+beginLine; + s+= " "+beginCol; + s+= "END@@"; + // System.out.println("Inline: "+s); + String string = makeAction(s, operation); + + // System.out.println("REFACTOR RESULT:"+string); + communicateRefactorResult(string); + return string; + } + + /** + * @param editorFile + * @param beginLine + * @param beginCol + * @param endLine + * @param endCol + * @param name + * @param operation + * @return + */ + public String extractLocalVariable(File editorFile, int beginLine, int beginCol, int endLine, int endCol, String name, Operation operation) { + String s = "@@BIKE"; + s+= "extractLocalVariable"; + s+= " "+editorFile.getAbsolutePath(); + s+= " "+beginLine; + s+= " "+beginCol; + s+= " "+endLine; + s+= " "+endCol; + s+= " "+name; + s+= "END@@"; + // System.out.println("Extract: "+s); + String string = makeAction(s, operation); + // System.out.println("REFACTOR RESULT:"+string); + + communicateRefactorResult(string); + return string; + } /** *************** *** 255,257 **** --- 304,308 ---- } + + } |