Bug 269493

Summary: [assist] Keywords are not proposed in a for statement without block
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.5   
Target Milestone: 3.5 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix & tests
none
Revised patch none

Description David Audel CLA 2009-03-20 06:36:50 EDT
build I20090317-1745

1) create Test.java
public class Test {
  void foo() {
    for(;;) ret| // do ctr+space at |
  }
}

2) do ctrl+space at |
The 'return' keyword is not proposed.

The same problem occurs with other keyword (assert, if, try, ...)
Comment 1 Srikanth Sankaran CLA 2009-03-26 10:51:51 EDT
Created attachment 129967 [details]
Proposed fix & tests

David, Thanks for your review.
Comment 2 David Audel CLA 2009-03-27 08:17:32 EDT
The fix looks good.

In the regression tests you should not use CompletionTestsRequestor but CompletionTestsRequestor2.
CompletionTestsRequestor is obsolete. It checks less properties of each proposal, so is less accurate.
I did not add a deprecated tag on CompletionTestsRequestor because it would add a lot of warnings in the problem views.
I will add a comment on CompletionTestsRequestor to inform that this class must not be used anymore.
Comment 3 Srikanth Sankaran CLA 2009-03-30 01:57:25 EDT
Created attachment 130200 [details]
Revised patch

Revised patch to use CompletionTestsRequestor2 in place
of CompletionTestsRequestor.

Released in HEAD for 3.5M7.

(Thanks for the review comments!)
Comment 4 Srikanth Sankaran CLA 2009-03-30 02:01:36 EDT
Released in HEAD for 3.5 M7
Comment 5 David Audel CLA 2009-04-27 09:37:39 EDT
Verified for 3.5M7 using I20090426-2000