[autocomplete] 132/143: Changing "Token" from a class to an interface, and being more explicit about discouraging the caching of Tokens without copying them first. This allows even more Token pooling (!) and thus better rendering performance. Also improved rendering code to not re-parse so much text on regular repaints. Should be better all around, though not noticable to the end user.

Benjamin Mesing ben at alioth.debian.org
Sat Oct 19 12:53:31 UTC 2013


This is an automated email from the git hooks/post-receive script.

ben pushed a commit to branch master
in repository autocomplete.

commit ccbd598ac06e8f1bf5469cb1663fecb5e80c3271
Author: bobbylight <robert at fifesoft.com>
Date:   Mon Jun 24 03:50:53 2013 +0000

    Changing "Token" from a class to an interface, and being more explicit about discouraging the caching of Tokens without copying them first.  This allows even more Token pooling (!) and thus better rendering performance.  Also improved rendering code to not re-parse so much text on regular repaints.  Should be better all around, though not noticable to the end user.
---
 .../fife/ui/autocomplete/LanguageAwareCompletionProvider.java    |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java b/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java
index b5775cc..8cd3ae6 100644
--- a/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java
+++ b/src/org/fife/ui/autocomplete/LanguageAwareCompletionProvider.java
@@ -246,7 +246,7 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
 				if (temp==null) {
 					return getDefaultCompletionProvider();
 				}
-				type = temp.type;
+				type = temp.getType();
 			}
 
 			// TokenMakers can use types < 0 for "internal types."  This
@@ -271,13 +271,13 @@ public class LanguageAwareCompletionProvider extends CompletionProviderBase
 		}
 
 		// FIXME: This isn't always a safe assumption.
-		if (dot==curToken.offset) { // At the very beginning of a new token
+		if (dot==curToken.getOffset()) { // At the very beginning of a new token
 			// Need to check previous token for its type before deciding.
 			// Previous token may also be on previous line!
 			return getDefaultCompletionProvider();
 		}
 
-		switch (curToken.type) {
+		switch (curToken.getType()) {
 			case Token.LITERAL_STRING_DOUBLE_QUOTE:
 			case Token.ERROR_STRING_DOUBLE:
 				return getStringCompletionProvider();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/autocomplete.git



More information about the pkg-java-commits mailing list