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

Bug 340299

Summary: RAP doesn't wrap "\n" in table cell
Product: [RT] RAP Reporter: Sun <suraj.rajyaguru>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Sun CLA 2011-03-17 06:27:13 EDT
Build Identifier: 20110218-0911

RCP (on Linux platform) table cell content is wrapped when "\n" is used but RAP doesn't wrap the same.

Multi-line rows in web based gui is very common. Just take an example of our RAP Community Forum web page " http://www.eclipse.org/forums/index.php?t=thread&frm_id= 34&S=93d9acc82566642c9de7f1a0b73ebc23", it also uses table with multi-line for main table.

More details and findings on the problem are there in RAP community Forum topic, "http://www.eclipse.org/forums/index.php?t=msg&th=206214&start=0&S=93d9acc82566642c9de7f1a0b73ebc23"

Note: On Windows even RCP doesn't wrap the table cell content. But there is a work-around. More details on this can be fount at above mentioned forum topic.

Reproducible: Always

Steps to Reproduce:
Here is a sample code to create table with multi-line,

private void createSimpleTable(Composite parent) {
TableViewer tv = new TableViewer(parent);
tv.setContentProvider(new IStructuredContentProvider() {
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
public void dispose() {
}
public Object[] getElements(Object inputElement) {
return (Object[]) inputElement;
}
});
tv.getTable().setLinesVisible(true);
tv.setInput(new String[]{"line 1\n line2", "line1 \n line2", "line 1\n line2", "line1 \n line2"});
}

This shows multi-line table in RCP app on Linux platform. Using the same code in RAP shows tripped off text in single line for each rows.
Comment 1 Ivan Furnadjiev CLA 2011-03-17 06:55:46 EDT
.

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