Bug 269493 - [assist] Keywords are not proposed in a for statement without block
Summary: [assist] Keywords are not proposed in a for statement without block
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-20 06:36 EDT by David Audel CLA
Modified: 2009-04-27 09:37 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix & tests (14.60 KB, patch)
2009-03-26 10:51 EDT, Srikanth Sankaran CLA
no flags Details | Diff
Revised patch (12.56 KB, patch)
2009-03-30 01:57 EDT, Srikanth Sankaran CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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