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 137348 Details for
Bug 276675
[Table] TopIndex is not correctly updated after disposal of items
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 patch with test case.
Bug-276675.patch (text/plain), 2.90 KB, created by
Ivan Furnadjiev
on 2009-05-27 11:00:00 EDT
(
hide
)
Description:
Proposed patch with test case.
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2009-05-27 11:00:00 EDT
Size:
2.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java,v >retrieving revision 1.16 >diff -u -r1.16 TableLCA.java >--- src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java 27 May 2009 09:09:59 -0000 1.16 >+++ src/org/eclipse/swt/internal/widgets/tablekit/TableLCA.java 27 May 2009 14:51:40 -0000 >@@ -168,7 +168,8 @@ > newSelection[ i ] = Integer.parseInt( selectedIndices[ i ] ); > } > } >- table.setSelection( newSelection ); >+ table.deselectAll(); >+ table.select( newSelection ); > } > } > >@@ -215,7 +216,7 @@ > > private static void readWidgetSelected( final Table table ) { > if( WidgetLCAUtil.wasEventSent( table, JSConst.EVENT_WIDGET_SELECTED ) ) { >- // TODO [rh] do something reasonable when index points to unresolved item >+ // TODO [rh] do something reasonable when index points to unresolved item > int index = getWidgetSelectedIndex(); > // Bugfix: check if index is valid before firing event to avoid problems > // with fast scrolling >@@ -382,7 +383,7 @@ > writer.call( "setScrollBarsVisibile", args ); > } > } >- >+ > ////////////////// > // Helping methods > >#P org.eclipse.rap.rwt.q07.test >Index: src/org/eclipse/swt/internal/widgets/tablekit/TableLCA_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.test/src/org/eclipse/swt/internal/widgets/tablekit/TableLCA_Test.java,v >retrieving revision 1.18 >diff -u -r1.18 TableLCA_Test.java >--- src/org/eclipse/swt/internal/widgets/tablekit/TableLCA_Test.java 27 May 2009 10:56:20 -0000 1.18 >+++ src/org/eclipse/swt/internal/widgets/tablekit/TableLCA_Test.java 27 May 2009 14:51:41 -0000 >@@ -752,6 +752,26 @@ > assertEquals( 5, tableAdapter.getFocusIndex() ); > } > >+ public void testReadTopIndex() { >+ Display display = new Display(); >+ Shell shell = new Shell( display ); >+ Table table = new Table( shell, SWT.MULTI ); >+ table.setSize( 485, 485 ); >+ for( int i = 0; i < 115; i++ ) { >+ new TableItem( table, SWT.NONE ); >+ } >+ String tableId = WidgetUtil.getId( table ); >+ String indices = "114,70,71,72,73,74,75,76,77,78,79,80,81,82,83," >+ + "84,85,86,87,88,89,90,91,92,93,94,95,96,97,98," >+ + "99,100,101,102,103,104,105,106,107,108,109," >+ + "110,111,112,113,0"; >+ Fixture.fakeRequestParam( tableId + ".topIndex", "0" ); >+ Fixture.fakeRequestParam( tableId + ".selection", indices ); >+ TableLCA tableLCA = new TableLCA(); >+ tableLCA.readData( table ); >+ assertEquals( 0, table.getTopIndex() ); >+ } >+ > protected void setUp() throws Exception { > RWTFixture.setUp(); > }
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
Flags:
ivan
:
review?
Actions:
View
|
Diff
Attachments on
bug 276675
:
137300
|
137311
| 137348