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

Bug 213301

Summary: 'Convert to StringBuffer' quick assist should use StringBuilder
Product: [Eclipse Project] JDT Reporter: Antoine Toulmé <antoine>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, martinae, remy.suen
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Antoine Toulmé CLA 2007-12-18 07:19:25 EST
Hi,

this bug is related to the News And Noteworthy Items for Eclipse 3.4 M4.
http://download.eclipse.org/eclipse/downloads/drops/S-3.4M4-200712131700/eclipse-news-M4.html

As stated here: http://www.lunar-ocean.com/blog/nls-and-stringbuffer/#comments,
the enhancement "'Convert to StringBuffer' quick assist" is not providing an easy way to internationalize the code.

It also apparently harms performance, because it is using StringBuffer instead of StringBuilder.

I recommend two actions:
-provide StringBuilder instead of StringBuffer. If the level of compatibility is less than 1.5, you could still offer to use StringBuffer.
-provide an alternate action with NLS.bind();
Comment 1 Martin Aeschlimann CLA 2007-12-18 10:46:52 EST
The request to use StringBuilder is bug 154199.

NLS.bind is an Eclipse/OSGI API. A quick fix using this would have to be offered by PDE, not JDT.
But there's a request for MessageFormat: bug 29562.

I mark this bug as dup of bug 154199. I you think we also need a quick assist for NLS.bind and MessageFormat is not good enough, file a request against PDE.

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