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 137611 Details for
Bug 278344
[List] Bogus item selection after removing selected 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.
Snippet to reproduce
clipboard.txt (text/plain), 1.19 KB, created by
Ralf Sternberg
on 2009-05-29 04:44:41 EDT
(
hide
)
Description:
Snippet to reproduce
Filename:
MIME Type:
Creator:
Ralf Sternberg
Created:
2009-05-29 04:44:41 EDT
Size:
1.19 KB
patch
obsolete
> >import org.eclipse.rwt.lifecycle.IEntryPoint; >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.SelectionAdapter; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.*; > > >public class ListSnippet implements IEntryPoint { > > public int createUI() { > Display display = new Display(); > Shell shell = new Shell( display ); > shell.setText( "Link Snippet" ); > shell.setLayout( new GridLayout() ); > > final List list = new List( shell, SWT.MULTI | SWT.BORDER ); > for( int i = 0; i < 5; i++ ) { > list.add( "Item" + i ); > } > > Button button = new Button( shell, SWT.PUSH ); > button.setText( "Remove selected" ); > button.addSelectionListener( new SelectionAdapter() { > public void widgetSelected( final SelectionEvent e ) { > String[] selection = list.getSelection(); > for( int i = 0; i < selection.length; i++ ) { > list.remove( selection[ i ] ); > } > }; > } ); > > shell.setLocation( 20, 20 ); > shell.setSize( 400, 300 ); > shell.open(); > > while( !shell.isDisposed() ) { > if( !display.readAndDispatch() ) { > display.sleep(); > } > } > return 0; > } >}
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 Raw
Actions:
View
Attachments on
bug 278344
: 137611