Bug 114115 - [assist] completionIdentifier should be set while reading next token instead of getting current identifier source
Summary: [assist] completionIdentifier should be set while reading next token instead ...
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-28 10:54 EDT by Frederic Fusier CLA
Modified: 2005-11-16 06:26 EST (History)
1 user (show)

See Also:


Attachments
Proposed patch (19.92 KB, patch)
2005-11-14 09:08 EST, David Audel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2005-10-28 10:54:52 EDT
3.2 M3 candidate

If CompletionScanner.getCurrentIdentifierSource() is not *always* called after
getNextToken(), parser using this kind of scanner can enter in an infinite loop
while scanning code!

An example of this has been unfortunately noticed in CompletionJavadocParser,
see bug 114901...

Seems not to be a potential issue for CompletionParser which always calls
CompletionScanner.getCurrentIdentifierSource method through consumeToken() after
each getNextToken() call. That's why this potential issue was never noticed before.
Comment 1 David Audel CLA 2005-11-03 10:41:20 EST
The example of this defect is bug 114091 and not bug 114901
Comment 2 David Audel CLA 2005-11-14 09:08:39 EST
Created attachment 29863 [details]
Proposed patch
Comment 3 David Audel CLA 2005-11-14 09:12:35 EST
Fixed and tests updated
  CompletionRecoveryTest#test14()
  CompletionRecoveryTest#test15()
Comment 4 Martin Aeschlimann CLA 2005-11-15 06:15:01 EST
*** Bug 116419 has been marked as a duplicate of this bug. ***
Comment 5 David Audel CLA 2005-11-16 06:10:24 EST
Reopen
Comment 6 David Audel CLA 2005-11-16 06:26:20 EST
Only the user of a CompletionScanner can known when the empty token is relevant
or not. scanner.currentPosition, getNextToken() and getCurrentIdentifierSource()
must be call in the correct sequence.

mark bug as WONTFIX