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 197601 Details for
Bug 346458
3 dots null items added on a TreeViewer
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]
Ported fix to 1.4 Maintenance branch
Bug-346458-v1.4-fix2.patch (text/plain), 4.85 KB, created by
Ivan Furnadjiev
on 2011-06-08 10:10:39 EDT
(
hide
)
Description:
Ported fix to 1.4 Maintenance branch
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2011-06-08 10:10:39 EDT
Size:
4.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.q07 >Index: js/org/eclipse/rwt/widgets/Tree.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/rwt/widgets/Tree.js,v >retrieving revision 1.40 >diff -u -r1.40 Tree.js >--- js/org/eclipse/rwt/widgets/Tree.js 6 May 2011 18:13:42 -0000 1.40 >+++ js/org/eclipse/rwt/widgets/Tree.js 8 Jun 2011 13:57:02 -0000 >@@ -557,20 +557,8 @@ > } > } > if( event.getData() === "remove" ) { >- var oldItem = event.getRelatedTarget(); >- this._deselectItem( oldItem, false ); >- if( this._topItem === oldItem ) { >- this._topItem = null; >- } >- if( this._leadItem === oldItem ) { >- this._leadItem = null; >- } >- if( this._focusItem === oldItem ) { >- this._focusItem = null; >- } >- if( this._hoverItem === oldItem ) { >- this._hoverItem = null; >- } >+ this._topItem = null; >+ this.addToQueue( "checkDisposedItems" ); > } > this._sendItemChange( item, event ); > this._renderItemChange( item, event ); >@@ -901,6 +889,9 @@ > > _layoutPost : function( changes ) { > this.base( arguments, changes ); >+ if( changes[ "checkDisposedItems" ] ) { >+ this._checkDisposedItems(); >+ } > if( changes[ "scrollHeight" ] ) { > this._updateScrollHeight(); > } >@@ -1317,7 +1308,26 @@ > this._scheduleUpdate(); > }, > >- >+ _checkDisposedItems : function() { >+ if( this._focusItem && this._focusItem.isDisposed() ) { >+ this._focusItem = null; >+ } >+ if( this._hoverItem && this._hoverItem.isDisposed() ) { >+ this._hoverItem = null; >+ } >+ if( this._leadItem && this._leadItem.isDisposed() ) { >+ this._leadItem = null; >+ } >+ var i = 0; >+ while( i < this._selection.length ) { >+ if( this._selection[ i ].isDisposed() ) { >+ this._deselectItem( this._selection[ i ], false ); >+ } else { >+ i++; >+ } >+ } >+ }, >+ > //////////////////////////// > // internal layout & theming > >#P org.eclipse.rap.rwt.q07.jstest >Index: js/org/eclipse/rwt/test/tests/TreeTest.js >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.q07.jstest/js/org/eclipse/rwt/test/tests/TreeTest.js,v >retrieving revision 1.28.2.1 >diff -u -r1.28.2.1 TreeTest.js >--- js/org/eclipse/rwt/test/tests/TreeTest.js 1 Jun 2011 09:33:54 -0000 1.28.2.1 >+++ js/org/eclipse/rwt/test/tests/TreeTest.js 8 Jun 2011 13:57:04 -0000 >@@ -3192,10 +3192,47 @@ > assertEquals( child0, tree._hoverItem ) > assertEquals( [ child0 ], tree._selection ); > child0.dispose(); >- assertNull( tree._topItem ) >- assertNull( tree._focusItem ) >- assertNull( tree._leadItem ) >- assertNull( tree._hoverItem ) >+ testUtil.flush(); >+ assertNull( tree._focusItem ); >+ assertNull( tree._leadItem ); >+ assertNull( tree._hoverItem ); >+ assertEquals( [], tree._selection ); >+ tree.destroy(); >+ }, >+ >+ testRemoveInderectlyDisposedItemFromState : function() { >+ var testUtil = org.eclipse.rwt.test.fixture.TestUtil; >+ var wm = org.eclipse.swt.WidgetManager.getInstance(); >+ var tree = this._createDefaultTree(); >+ tree.setHasMultiSelection( true ); >+ tree.setHeight( 15 ); >+ tree.setItemHeight( 20 ); >+ tree.setItemCount( 1 ); >+ var child0 = new org.eclipse.rwt.widgets.TreeItem( tree.getRootItem(), 0 ); >+ child0.setItemCount( 1 ); >+ var child1 = new org.eclipse.rwt.widgets.TreeItem( child0, 0 ); >+ child1.setTexts( [ "C1" ] ); >+ child0.setExpanded( true ); >+ tree.setTopItemIndex( 1 ); >+ tree.setFocusItem( child1 ); >+ testUtil.flush(); >+ assertEquals( child1, tree._topItem ) >+ testUtil.mouseOver( tree._clientArea._children[ 0 ] ); >+ testUtil.shiftClick( tree._clientArea._children[ 0 ] ); >+ assertEquals( child1, tree._focusItem ); >+ assertEquals( [ child1 ], tree._selection ); >+ assertEquals( child1, tree._leadItem ); >+ child0.dispose(); // Order is important for this test >+ child1.dispose(); >+ var child0new = new org.eclipse.rwt.widgets.TreeItem( tree.getRootItem(), 0 ); >+ child0new.setItemCount( 1 ); >+ var child1new = new org.eclipse.rwt.widgets.TreeItem( child0new, 0 ); >+ child1new.setTexts( [ "C1new" ] ); >+ child0new.setExpanded( true ); >+ testUtil.flush(); >+ assertEquals( child1new, tree._topItem ); >+ assertNull( tree._leadItem ); >+ assertNull( tree._focusItem ); > assertEquals( [], tree._selection ); > tree.destroy(); > },
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 346458
:
196117
|
196215
|
197067
|
197436
|
197455
| 197601