[Pydev-cvs] org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/templates PyDo
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-06-14 22:14:49
|
Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27940/src_completions/org/python/pydev/editor/codecompletion/templates Modified Files: PyDocumentTemplateContext.java Log Message: Using faster version of StringBuffer: FastStrintgBuffer / Better icons for auto-import. Index: PyDocumentTemplateContext.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/templates/PyDocumentTemplateContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyDocumentTemplateContext.java 4 Aug 2007 16:01:11 -0000 1.1 --- PyDocumentTemplateContext.java 14 Jun 2008 22:14:56 -0000 1.2 *************** *** 17,20 **** --- 17,21 ---- import org.python.pydev.core.docutils.DocUtils; import org.python.pydev.core.docutils.StringUtils; + import org.python.pydev.core.structure.FastStringBuffer; import org.python.pydev.editor.PyEdit; import org.python.pydev.editor.autoedit.DefaultIndentPrefs; *************** *** 79,83 **** }else{ if(pattern.indexOf(spacesIndentString) != -1){ ! StringBuffer newPattern = new StringBuffer(); for(int i=0; i<splitted.size();i++){ --- 80,85 ---- }else{ if(pattern.indexOf(spacesIndentString) != -1){ ! FastStringBuffer newPattern = new FastStringBuffer(); ! FastStringBuffer newTabsIndent = new FastStringBuffer(); for(int i=0; i<splitted.size();i++){ *************** *** 96,100 **** tabsToAdd += 1; } ! StringBuffer newTabsIndent = new StringBuffer(); for(int j = 0; j< tabsToAdd; j++){ newTabsIndent.append("\t"); --- 98,102 ---- tabsToAdd += 1; } ! newTabsIndent.clear(); for(int j = 0; j< tabsToAdd; j++){ newTabsIndent.append("\t"); *************** *** 116,120 **** if(splitted.size() > 1 && indentTo != null && indentTo.length() > 0){ ! StringBuffer buffer = new StringBuffer(splitted.get(0)); for (int i=1; i<splitted.size();i++) { //we don't want to get the first line buffer.append(indentTo); --- 118,122 ---- if(splitted.size() > 1 && indentTo != null && indentTo.length() > 0){ ! FastStringBuffer buffer = new FastStringBuffer(splitted.get(0), 128); for (int i=1; i<splitted.size();i++) { //we don't want to get the first line buffer.append(indentTo); |