Community
Participate
Working Groups
Take the following code example public class Application { public static void main(String[] args) { Mockito.mock(Application.class, ) } } When we have this code there is error at line Mockito.mock(Application.class, ) underlining the .class and saying "Syntax error, insert ";" to complete BlockStatements", this causes any AST parsing to fail and therefore will not be able to figure out the current method invocation to inspect the parameter type at the current caret position for example. I this the error must be shown at the end of ) of that line. This how other IDEs such as IJ handles this situation.
Created attachment 282889 [details] Eclipse
Created attachment 282890 [details] IJ
Is this problem specific to Foo.class expressions as invocation argument? Is the dangling ',' part of the problem? Note, that syntax errors are not individually implemented, but reported through sophisticated heuristics, see class DiagnoseParser for details. The key notion here is to compute the minimal repair to go from the current input to a legal one. It seems, the correct repair was found (insert ';') but the location is not optimal, likely caused by the fact that we have 2 syntax errors in the input.
Yes as soon as we have dangling , the AST tree stops working, basically I cannot find this invocation until i add a something to fill that parameter location.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.