Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339934

Summary: [assist] CompletionContext.getTokenStart() returns '-1' if caret is within the hexadecimal value of Unicode
Product: [Eclipse Project] JDT Reporter: Pascal Filion <pascal.filion>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, daniel_megert
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Pascal Filion CLA 2011-03-14 14:24:30 EDT
Build Identifier: I20110309-1800

When doing content assist within the unicode value of a character, CompletionContext.getTokenStart() returns -1. If the cursor is after \ or u, the position is correct, but within the numbers, then it's -1.

Reproducible: Always

Steps to Reproduce:
1. Create a new Java project
2. Add persistence.jar (JPA) to the build path
3. Create a new class looking like this:

@NamedQuery(name="find", query="S\u00E9")
public class MyClass {
}

4. Move the cursor within "S\u" and invoke content assist, the token start will have the correct position.
5. Move the cursor after "S\u00" and invoke content assist, the token start will be -1.
Comment 1 Eclipse Genie CLA 2020-04-16 13:39:28 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.