[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/autoedit AbstractIndentPrefs.java, 1.4, 1.
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-06-14 22:14:53
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/autoedit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27940/src/org/python/pydev/editor/autoedit Modified Files: AbstractIndentPrefs.java PyAutoIndentStrategy.java Log Message: Using faster version of StringBuffer: FastStrintgBuffer / Better icons for auto-import. Index: PyAutoIndentStrategy.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/autoedit/PyAutoIndentStrategy.java,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** PyAutoIndentStrategy.java 6 Apr 2008 19:51:34 -0000 1.67 --- PyAutoIndentStrategy.java 14 Jun 2008 22:14:57 -0000 1.68 *************** *** 21,24 **** --- 21,25 ---- import org.python.pydev.core.docutils.PySelection; import org.python.pydev.core.docutils.StringUtils; + import org.python.pydev.core.structure.FastStringBuffer; import org.python.pydev.editor.actions.PyAction; *************** *** 239,243 **** int end= findEndOfWhiteSpace(d, start, offset); ! StringBuffer buf= new StringBuffer(text); if (end > start) { // append to input --- 240,244 ---- int end= findEndOfWhiteSpace(d, start, offset); ! FastStringBuffer buf= new FastStringBuffer(text, end-start+1); if (end > start) { // append to input Index: AbstractIndentPrefs.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/autoedit/AbstractIndentPrefs.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AbstractIndentPrefs.java 14 Sep 2005 16:32:12 -0000 1.4 --- AbstractIndentPrefs.java 14 Jun 2008 22:14:57 -0000 1.5 *************** *** 10,13 **** --- 10,14 ---- import org.eclipse.jface.text.IDocument; import org.python.pydev.core.docutils.DocUtils; + import org.python.pydev.core.structure.FastStringBuffer; /** *************** *** 80,84 **** // contains a char (pasted text) byte[] byteLine = text.getBytes(); ! StringBuffer newText = new StringBuffer(); for (int count = 0; count < byteLine.length; count++) { if (byteLine[count] == '\t'){ --- 81,85 ---- // contains a char (pasted text) byte[] byteLine = text.getBytes(); ! FastStringBuffer newText = new FastStringBuffer(); for (int count = 0; count < byteLine.length; count++) { if (byteLine[count] == '\t'){ |