[Pydev-cvs] org.python.pydev.jython/jysrc assign_params_to_attributes_action.py, 1.1, 1.2
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-07-16 00:38:53
|
Update of /cvsroot/pydev/org.python.pydev.jython/jysrc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3433/jysrc Modified Files: assign_params_to_attributes_action.py Log Message: Fixed problems in assign to attributes. Index: assign_params_to_attributes_action.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.jython/jysrc/assign_params_to_attributes_action.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** assign_params_to_attributes_action.py 1 Jun 2006 17:44:26 -0000 1.1 --- assign_params_to_attributes_action.py 16 Jul 2008 00:38:57 -0000 1.2 *************** *** 14,18 **** from org.eclipse.jface.action import Action #@UnresolvedImport import re - from java.lang import StringBuffer from org.eclipse.jface.dialogs import MessageDialog #@UnresolvedImport from org.python.pydev.core.docutils import PySelection #@UnresolvedImport --- 14,17 ---- *************** *** 139,142 **** --- 138,143 ---- sIndent = self._indent(oSelection) + PyAction.getStaticIndentationString(self.editor) + parsingUtils = ParsingUtils.create(oDocument) + # Is there a docstring? In that case we need to skip past it. sDocstrFirstLine = oSelection.getLine(iClosingParLine + 1) *************** *** 149,154 **** iDocstrStartCol = min([i for i in li if i >= 0]) iDocstrStart = iDocstrLineOffset + iDocstrStartCol ! oDummy = StringBuffer() ! iDocstrEnd = ParsingUtils.eatLiterals(oDocument, oDummy, iDocstrStart) iInsertAfterLine = oSelection.getLineOfOffset(iDocstrEnd) sIndent = PySelection.getIndentationFromLine(sDocstrFirstLine) --- 150,154 ---- iDocstrStartCol = min([i for i in li if i >= 0]) iDocstrStart = iDocstrLineOffset + iDocstrStartCol ! iDocstrEnd = parsingUtils.eatLiterals(None, iDocstrStart) iInsertAfterLine = oSelection.getLineOfOffset(iDocstrEnd) sIndent = PySelection.getIndentationFromLine(sDocstrFirstLine) *************** *** 160,164 **** iDocLength = oDocument.getLength() iLastLine = oSelection.getLineOfOffset(iDocLength) ! sLastChar = str(ParsingUtils.charAt(oDocument, iDocLength - 1)) if (iInsertAfterLine == iLastLine and not self.getNewLineDelim().endswith(sLastChar)): --- 160,164 ---- iDocLength = oDocument.getLength() iLastLine = oSelection.getLineOfOffset(iDocLength) ! sLastChar = str(parsingUtils.charAt(iDocLength - 1)) if (iInsertAfterLine == iLastLine and not self.getNewLineDelim().endswith(sLastChar)): |