Bug 138375 - [typing] String literal split by editor: take NON-NLS markers into account
Summary: [typing] String literal split by editor: take NON-NLS markers into account
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-25 10:26 EDT by Maxime Daniel CLA
Modified: 2006-04-26 04:14 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 Maxime Daniel CLA 2006-04-25 10:26:15 EDT
N20060425-0010

The Java editor helps splitting string literals by inserting the needed extra characters, and this is quite cool:

"a long literal"
       ^ caret here and press enter results into:
"a long" +
    " literal"

Now, it would be even better if it took care of NON-NLS markers as well.
As of today:
"a long literal"; // $NON-NLS-1$
       ^ caret here and press enter results into:
"a long" +
    " literal";  //$NON-NLS-1$
with a warning on the first line... Whereas it would be better to get:
"a long" + //$NON-NLS-1$
    " literal";  //$NON-NLS-1$
(and no warning).

There are variants that makes it a bit harder than it seems at first sight (consider splitting any of the multiple strings in a single line, some of these being marked as NON-NLS). But this would save quite a few cut and paste or quick fixes.