Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354129 - [Link] Link ignores newlines
Summary: [Link] Link ignores newlines
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.5 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-08 09:17 EDT by Ralf Sternberg CLA
Modified: 2011-09-21 09:46 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.