IDocument document = getDocument();
try {
int start = getCompletionOffset();
-
- if ( ((start != 0) && specialChars.indexOf(document.getChar(start - 1)) != (-1) )) {
- return --start;
- }
-
- while (((start != 0) && Character.isUnicodeIdentifierPart(document.getChar(start - 1)))
- || ((start != 0) && specialChars.indexOf(document.getChar(start - 1)) != (-1) )) {
- start--;
+ char ch = ' ';
+ while (start != 0) {
+ ch = document.getChar(start - 1);
+ if (specialChars.indexOf(ch) != (-1)) {
+ return --start;
+ }
+ if (Character.isUnicodeIdentifierPart(ch)) {
+ start--;
+ } else {
+ break;
+ }
}
-
- if (((start != 0) && Character.isUnicodeIdentifierStart(document.getChar(start - 1)))
- || ((start != 0) && specialChars.indexOf(document.getChar(start - 1)) != (-1) )) {
+ if ((start != 0) && Character.isUnicodeIdentifierStart(document.getChar(start - 1))) {
start--;
+ if ((start != 0) && specialChars.indexOf(document.getChar(start - 1)) != (-1)) {
+ start--;
+ }
}
+ // while (((start != 0)
+ // && Character.isUnicodeIdentifierPart(document.getChar(start - 1)))
+ // || ((start != 0)
+ // && specialChars.indexOf(document.getChar(start - 1)) != (-1))) {
+ // start--;
+ // }
+ //
+ //if (((start != 0)
+ // && Character.isUnicodeIdentifierStart(document.getChar(start - 1)))
+ // || ((start != 0)
+ // && specialChars.indexOf(document.getChar(start - 1)) != (-1))) {
+ // start--;
+ //}
+
return start;
} catch (BadLocationException e) {