Bug 44983 - Missing semicolon should not prevent AST node creations.
Summary: Missing semicolon should not prevent AST node creations.
Status: VERIFIED DUPLICATE of bug 42253
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-15 20:18 EDT by Brett Kotch CLA
Modified: 2006-02-15 11:37 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Kotch CLA 2003-10-15 20:18:20 EDT
Type 

ArrayEnumeration e

and assume that ArrayEnumeration isn't imported yet. The quick fix notifying to 
import ArrayEnumeration doesn't show up till after I type the entire line! 

ArrayEnumeration e = null;

Right after I type "null;", seeing no errors I hit return. But then the quick 
fix pops up. Since I am on a different line, I can't use ctrl-1 to quickly pop 
the fix up ... but I have to go to the previous line, or drag my mouse over to 
the fix. 

To make matters worse, if I start typing on that second line ... i.e. 

ArrayEnumeration e = null;
String s

The quick fix doesn't even appear. I can go on typing like this for some time. 
Not until after I am finished typing the second, will that quick fix appear, 
but only if I wait long enough. If I start the third line ... no quick fix.
Comment 1 Martin Aeschlimann CLA 2003-10-16 04:34:26 EDT
This has to do with the error tollerance of the AST. A missing semicolon is
(unfortunatly) already enough to prevent the creation of other statements.

In the given examples I think for 'ArrayEnumeration e' it is clear that there
won't be an AST.
But for 
ArrayEnumeration e = null;
String s
I think the first statement should appear.

Moving to jdt.core.
Comment 2 Martin Aeschlimann CLA 2003-10-16 06:06:25 EDT
*** Bug 44964 has been marked as a duplicate of this bug. ***
Comment 3 Olivier Thomann CLA 2003-10-16 07:51:05 EDT
We don't have error recovery at the statement level. A syntax error will prevent
the AST from being created, because the rule cannot be reduced in the parser.
Comment 4 Olivier Thomann CLA 2003-10-16 07:53:38 EDT
Close as duplicate of bug 42253.

*** This bug has been marked as a duplicate of 42253 ***
Comment 5 Frederic Fusier CLA 2006-02-15 10:58:22 EST
Verified for 3.2 M5 using build I20060215-0010.
Comment 6 Frederic Fusier CLA 2006-02-15 11:21:53 EST
Note that bug 44694 is_not_ a duplicate of this bug...
Comment 7 Frederic Fusier CLA 2006-02-15 11:28:54 EST
Sorry, you should read bug 44964 is _not_ a duplicate in previous comment