Bug 68454 - [typing][navigation] Word navigation doesn't work correctly on lower case words with underscore
Summary: [typing][navigation] Word navigation doesn't work correctly on lower case wor...
Status: RESOLVED DUPLICATE of bug 67381
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-24 03:22 EDT by Gabriele Garuglieri CLA
Modified: 2004-07-20 03:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriele Garuglieri CLA 2004-06-24 03:22:12 EDT
Version: 3.0.0
Build id: 200406192000
Let's start with word AAA_BBB, if you put cursor after BBB and press
CTRL+backspace (Cb from now on), _BBB is deleted and AAA will remain, but if you
have AAA_bbb, putting the cursor after bbb and pressing Cb will delete everything.

If you have AAA_BBB_CCC, putting the cursor after CCC and pressing Cb will
delete _CCC and AAA_BBB will remain, but if you have AAA_BBB_ccc, putting the
cursor after ccc and pressing Cb will delete _BBB_ccc and AAA will remain.
Comment 1 Dani Megert CLA 2004-06-24 04:21:13 EDT
This happens when you enable Preferences > Java > Editor > Navigation 
[x] Smart caret positioning in Java names (...)

You can disable this to get the platform behavior back.

We assumed that _ in Java is either used at the beginning or as part of a
constant (with all uppercase letters). Can you tell us your code pattern where
you use _ in combination with lower-case letters when writing Java code?

To be revisited after 3.0.
Comment 2 Gabriele Garuglieri CLA 2004-06-28 11:38:37 EDT
Well, to be sincere i stumbled on it by chance.
I was correcting the name of a final static field and i intended to write
USER_REQUIRED_ATTR_MISSING, but ended writing USER_REQUIRED_ATTR_missing.
So i CTRL+backspaced to correct it and _ATTR_missing was eaten, surfacing this
behaviour.
Since CTRL+cancel is correctly eating all, from the cursor position to the first
underscore it finds, independently from the case, i was assuming that
CTRL+backspace should behave the same.
Comment 3 Dani Megert CLA 2004-07-20 03:21:21 EDT
I'm marking this one as duplicate of bug 67381 which collects Java word
navigation improvements.

*** This bug has been marked as a duplicate of 67381 ***