Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/correctionassist/heuristics
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27940/src/org/python/pydev/editor/correctionassist/heuristics
Modified Files:
AssistAssign.java AssistOverride.java AssistSurroundWith.java
Log Message:
Using faster version of StringBuffer: FastStrintgBuffer / Better icons for auto-import.
Index: AssistAssign.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/correctionassist/heuristics/AssistAssign.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** AssistAssign.java 9 Apr 2008 00:43:47 -0000 1.17
--- AssistAssign.java 14 Jun 2008 22:14:56 -0000 1.18
***************
*** 19,22 ****
--- 19,23 ----
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.PyEdit;
import org.python.pydev.editor.actions.PyAction;
***************
*** 148,152 ****
private String changeToCodingStd(String callName) {
if(!this.std.localsAndAttrsCamelcase()){
! StringBuffer ret = new StringBuffer();
char[] cs = callName.toCharArray();
--- 149,153 ----
private String changeToCodingStd(String callName) {
if(!this.std.localsAndAttrsCamelcase()){
! FastStringBuffer ret = new FastStringBuffer();
char[] cs = callName.toCharArray();
Index: AssistOverride.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/correctionassist/heuristics/AssistOverride.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** AssistOverride.java 25 Feb 2007 12:07:35 -0000 1.20
--- AssistOverride.java 14 Jun 2008 22:14:56 -0000 1.21
***************
*** 17,20 ****
--- 17,21 ----
import org.python.pydev.core.bundle.ImageCache;
import org.python.pydev.core.docutils.PySelection;
+ import org.python.pydev.core.structure.FastStringBuffer;
import org.python.pydev.editor.PyEdit;
import org.python.pydev.editor.actions.PyAction;
***************
*** 57,64 ****
for (IToken token:selfCompletions) {
String rep = token.getRepresentation();
if(rep.startsWith(tok)){
! StringBuffer buffer = new StringBuffer( start );
buffer.append(rep);
--- 58,67 ----
+ FastStringBuffer buffer = new FastStringBuffer();
for (IToken token:selfCompletions) {
String rep = token.getRepresentation();
if(rep.startsWith(tok)){
! buffer.clear();
! buffer.append(start);
buffer.append(rep);
Index: AssistSurroundWith.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/correctionassist/heuristics/AssistSurroundWith.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AssistSurroundWith.java 1 May 2008 14:26:00 -0000 1.1
--- AssistSurroundWith.java 14 Jun 2008 22:14:56 -0000 1.2
***************
*** 22,25 ****
--- 22,26 ----
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.PyEdit;
import org.python.pydev.editor.actions.PyAction;
***************
*** 52,56 ****
//get the 1st char (determines indent)
int firstCharPosition = PySelection.getFirstCharRelativePosition(ps.getDoc(), start);
! StringBuffer startIndentBuffer = new StringBuffer();
int i = 0;
while(i < firstCharPosition){
--- 53,57 ----
//get the 1st char (determines indent)
int firstCharPosition = PySelection.getFirstCharRelativePosition(ps.getDoc(), start);
! FastStringBuffer startIndentBuffer = new FastStringBuffer(firstCharPosition+1);
int i = 0;
while(i < firstCharPosition){
|