mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
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:
@@ -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.
|
||||
|
||||
@@ -419,7 +419,6 @@ public class PreprocService {
|
||||
.forEach(result.otherProblems::add);
|
||||
|
||||
result.hasSyntaxErrors = true;
|
||||
return result.build();
|
||||
}
|
||||
|
||||
// Save off the imports
|
||||
|
||||
Reference in New Issue
Block a user