Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 136480 Details for
Bug 277089
[table] IOOBE when dynamically creating columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed solution
clipboard.txt (text/plain), 3.37 KB, created by
Ralf Sternberg
on 2009-05-20 08:38:29 EDT
(
hide
)
Description:
Proposed solution
Filename:
MIME Type:
Creator:
Ralf Sternberg
Created:
2009-05-20 08:38:29 EDT
Size:
3.37 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07.test >Index: src/org/eclipse/swt/internal/widgets/tableitemkit/TableItemLCA_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.test/src/org/eclipse/swt/internal/widgets/tableitemkit/TableItemLCA_Test.java,v >retrieving revision 1.7 >diff -u -r1.7 TableItemLCA_Test.java >--- src/org/eclipse/swt/internal/widgets/tableitemkit/TableItemLCA_Test.java 28 Apr 2009 20:48:16 -0000 1.7 >+++ src/org/eclipse/swt/internal/widgets/tableitemkit/TableItemLCA_Test.java 20 May 2009 12:37:04 -0000 >@@ -351,4 +351,18 @@ > String result = Fixture.getAllMarkup(); > assertTrue( result.indexOf( expected ) != -1 ); > } >+ >+ public void testDynamicColumns() { >+ Display display = new Display(); >+ Shell shell = new Shell( display ); >+ Table table = new Table( shell, SWT.NONE ); >+ new TableColumn( table, SWT.NONE ); >+ TableItem item = new TableItem( table, SWT.NONE ); >+ item.setBackground( 0, display.getSystemColor( SWT.COLOR_BLACK ) ); >+ // Create another column after setting a cell background >+ // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=277089 >+ new TableColumn( table, SWT.NONE ); >+ RWTFixture.markInitialized( display ); >+ RWTFixture.preserveWidgets(); >+ } > } >#P org.eclipse.rap.rwt >Index: src/org/eclipse/swt/widgets/TableItem.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/TableItem.java,v >retrieving revision 1.50 >diff -u -r1.50 TableItem.java >--- src/org/eclipse/swt/widgets/TableItem.java 29 Apr 2009 14:35:04 -0000 1.50 >+++ src/org/eclipse/swt/widgets/TableItem.java 20 May 2009 12:37:06 -0000 >@@ -48,9 +48,11 @@ > public Color[] getCellBackgrounds() { > int columnCount = Math.max( 1, getParent().getColumnCount() ); > Color[] result = new Color[ columnCount ]; >- for( int i = 0; i < result.length; i++ ) { >- if( data != null && data[ i ] != null ) { >- result[ i ] = data[ i ].background; >+ if( data != null ) { >+ for( int i = 0; i < data.length; i++ ) { >+ if( data[ i ] != null ) { >+ result[ i ] = data[ i ].background; >+ } > } > } > return result; >@@ -59,9 +61,11 @@ > public Color[] getCellForegrounds() { > int columnCount = Math.max( 1, getParent().getColumnCount() ); > Color[] result = new Color[ columnCount ]; >- for( int i = 0; i < result.length; i++ ) { >- if( data != null && data[ i ] != null ) { >- result[ i ] = data[ i ].foreground; >+ if( data != null ) { >+ for( int i = 0; i < data.length; i++ ) { >+ if( data[ i ] != null ) { >+ result[ i ] = data[ i ].foreground; >+ } > } > } > return result; >@@ -70,9 +74,11 @@ > public Font[] getCellFonts() { > int columnCount = Math.max( 1, getParent().getColumnCount() ); > Font[] result = new Font[ columnCount ]; >- for( int i = 0; i < result.length; i++ ) { >- if( data != null && data[ i ] != null ) { >- result[ i ] = data[ i ].font; >+ if( data != null ) { >+ for( int i = 0; i < data.length; i++ ) { >+ if( data[ i ] != null ) { >+ result[ i ] = data[ i ].font; >+ } > } > } > return result;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 277089
:
136458
| 136480