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

Bug 332932

Summary: [Table] Inserting a column does not shift item properties
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ruediger.herrmann
Version: 1.4   
Target Milestone: 1.4 M7   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2010-12-20 06:14:52 EST
Inserting a column into a Table must shift all cell properties after the insert position. The following test works with SWT but fails in RAP:

  public void testInsertColumn() {
    Table table = new Table( shell, SWT.BORDER );
    for( int i = 0; i < 3; i++ ) {
      new TableColumn( table, SWT.NONE );
    }
    final TableItem item = new TableItem( table, SWT.NONE );
    for( int i = 0; i < 3; i++ ) {
      item.setText( i, "cell" + i );
    }
    new TableColumn( table, SWT.NONE, 1 );
    assertEquals( "cell0", item.getText( 0 ) );
    assertEquals( "", item.getText( 1 ) );
    assertEquals( "cell1", item.getText( 2 ) );
    assertEquals( "cell2", item.getText( 3 ) );
  }

Should also be tested with all other cell properties like images, fonts, colors etc.
Tree seems to behave correctly.
Comment 1 Ivan Furnadjiev CLA 2011-04-12 10:13:28 EDT
Now, when a new column is inserted the item data are shifted is needed. JUnit tests added for all data properties. Changes are in CVS HEAD.