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

Bug 354129

Summary: [Link] Link ignores newlines
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.5   
Target Milestone: 1.5 M2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2011-08-08 09:17:47 EDT
Snippet to reproduce:
  Link link = new Link( parent, SWT.WRAP );
  link.setText( "first line\nsecond line" );
In SWT, the linebreak is preserved, in RAP it's not.
Comment 1 Ivan Furnadjiev CLA 2011-08-08 10:09:56 EDT
Ralf, neither SWT.WRAP javadoc nor Link javadoc state that Link widget supports SWT.WRAP style flag.... at least on Windows. Forms Hyperlink widget is the one that supports SWT.WRAP style flag.
Comment 2 Ralf Sternberg CLA 2011-08-08 10:43:06 EDT
(In reply to comment #1)
> Ralf, neither SWT.WRAP javadoc nor Link javadoc state that Link widget supports
> SWT.WRAP style flag.... at least on Windows. Forms Hyperlink widget is the one
> that supports SWT.WRAP style flag.

Right, I missed this. That means in contrast to a Label, a Link *always* wraps.
Anyway, the SWT Link respects newlines, so the RWT Link should do so as well.
Comment 3 Ivan Furnadjiev CLA 2011-09-21 09:46:00 EDT
Fixed in CVS HEAD by replacing new lines with <br/> in LinkAdapter.js.