Commit 3b90872c authored by Johannes Roith's avatar Johannes Roith

Merge branch 'master' of github.com:jroith/cup-eclipse

parents 27a9f6bd 1975089b
......@@ -13,6 +13,7 @@ import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import de.in.tum.www2.cup.CupSymbol;
import de.in.tum.www2.cup.Declarations;
import de.in.tum.www2.cup.ast.ParserResult;
import de.tum.in.www2.cupplugin.IDisposable;
......@@ -150,10 +151,10 @@ public class CupContentAssistProcessor implements IContentAssistProcessor,
}
try {
char aChar = doc.getChar(offset);
if (Character.isWhitespace(aChar))
if (CupSymbol.isDelimiter(aChar))
return aWord;
while (!Character.isWhitespace(aChar)) {
while (!CupSymbol.isDelimiter(aChar)) {
aWord = aChar + aWord;
aChar = doc.getChar(++offset);
}
......@@ -171,12 +172,12 @@ public class CupContentAssistProcessor implements IContentAssistProcessor,
IDocument doc = viewer.getDocument();
try {
char aChar = doc.getChar(offset);
if (Character.isWhitespace(aChar)) {
if (CupSymbol.isDelimiter(aChar)) {
return "";
}
String aWord = "";
while (!Character.isWhitespace(aChar)) {
while (!CupSymbol.isDelimiter(aChar)) {
aWord = aChar + aWord;
aChar = doc.getChar(--offset);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment