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

Bug 280266

Summary: [CLabel] does not handle newlines correctly
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 1.3 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix none

Description Rüdiger Herrmann CLA 2009-06-15 08:33:35 EDT
In order to work the same as in SWT, there is a WidgetLCAUtil#replaceNewLines( text, "<br/>" ) missing in CLabelLCA#writeText()
See this example:
  CLabel label = new CLabel( shell, SWT.BORDER );
  label.setText( "First line\n\tSecond Line" );
Comment 1 Rüdiger Herrmann CLA 2009-06-15 08:35:55 EDT
Created attachment 139166 [details]
Fix
Comment 2 Ralf Sternberg CLA 2009-08-05 10:59:28 EDT
Fixed in CVS HEAD.
Besides applying the patch, it was also necessary to change TextSizeDetermination#stringExtent() to the multi-line capable method TextSizeDetermination.textExtent().