I'm currently working in a custom Java code completion plug-in that works with an API to process the context and return suggestions.
In most cases, the API is capable of making very good predictions. But, unfortunately, it doesn't always happen. Often, the suggestions contain errors, such as an unassigned variable or a class method that does not exist.
That said, I would like to know what can be explored to inspect the prediction for syntax errors and omit the completion when specific errors are detected.
The code is available here