Bug 138432

Summary: Spec of ICodeAssist#codeSelect() doesn't describe the behavior of empty selection
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, philippe_mulet
Version: 3.0   
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description David Audel CLA 2006-04-25 13:02:40 EDT
From bug 94705.

The spec of ICodeAssist#codeSelect() doesn't descibe that we return the element just before the offset when the length is 0.

1) create X.java
class X implemnents Runnable| {
}
2) Do F3 at | location.
Comment 1 David Audel CLA 2006-04-25 13:29:54 EDT
I suggest to add the following lines to the spec of ICodeAssist#codeSelect(...)

* <p>
* Note that if the <code>length</code> is 0 and the <code>offset</code> is inside an identifier 
* or the index just after an identifier then this identifier is considered as the selection.
* </p>
Comment 2 Philipe Mulet CLA 2006-04-26 05:24:26 EDT
+1 for 3.2RC2
Comment 3 David Audel CLA 2006-04-26 06:03:53 EDT
Javadoc update released.
Comment 4 Olivier Thomann CLA 2006-04-28 14:21:36 EDT
Verified with I20060427-1600 for 3.2RC2