Allow syntax error to try to complete text edits.

Do not stop trying to generate java code when there is a syntax error but also have the completion generator check that types are available.
This commit is contained in:
A Pottinger
2021-07-03 16:26:32 -07:00
parent a1406400a5
commit 54496a0b7e
2 changed files with 4 additions and 1 deletions

View File

@@ -1693,6 +1693,10 @@ public class CompletionGenerator {
final int lineNumber) {
Messages.log("* preparePredictions");
if (ps.compilationUnit.types().size() == 0) {
return new ArrayList<>();
}
ASTNode astRootNode = (ASTNode) ps.compilationUnit.types().get(0);
// If the parsed code contains pde enhancements, take 'em out.

View File

@@ -419,7 +419,6 @@ public class PreprocService {
.forEach(result.otherProblems::add);
result.hasSyntaxErrors = true;
return result.build();
}
// Save off the imports