Bug 77632

Summary: [quick assist] concatenate/merge string literals
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: UIAssignee: Billy Huang <billyhuang31>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, deepakazad, markus.kell.r, nikolaymetchev
Version: 3.1Keywords: bugday
Target Milestone: 4.3 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 394287    
Attachments:
Description Flags
Patch to add "Combine selected strings" quick assist none

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.