Bug 77632 - [quick assist] concatenate/merge string literals
Summary: [quick assist] concatenate/merge string literals
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 4.3 M4   Edit
Assignee: Billy Huang CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks: 394287
  Show dependency tree
 
Reported: 2004-11-03 09:49 EST by Dirk Baeumer CLA
Modified: 2012-12-11 02:07 EST (History)
4 users (show)

See Also:


Attachments
Patch to add "Combine selected strings" quick assist (13.11 KB, patch)
2012-11-14 00:36 EST, Billy Huang CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2004-11-03 09:49:09 EST
M3 test candidate

String s= "Ec" + "lip" + "se";

Selecting "Ec" + "lip" + "se" should offer a quick assist to join strings into
"Eclipse"
Comment 1 Markus Keller CLA 2011-03-24 07:17:07 EDT
This is the reverse of "Pick out selected part of String".
Comment 2 Billy Huang CLA 2012-11-14 00:36:34 EST
Created attachment 223548 [details]
Patch to add "Combine selected strings" quick assist

Proposed patch for bug, courtesy of Vancouver Eclipse Hackathon :)
Comment 4 Markus Keller CLA 2012-11-14 09:40:08 EST
Thanks everybody. I've changed the label to "Combine to single String", made it work if the caret is on or inside a StringLiteral (like the "Use 'StringBuilder' for string concatenation"), and adjusted the copyright to the pattern we use for all new contributions:
Your Name <email@example.com> - Bug Title - https://bugs.eclipse.org/BUG_NUMBER

http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=1949da52f6ae5c880195499dfa95263a5b267bbf

Filed bug 394287 to make it also work when interspersed with other literals.
Comment 5 Dani Megert CLA 2012-12-11 02:07:31 EST
Verified in I20121210-2000.