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 214096 Details for
Bug 376957
[Text] Setting the selection doesn't work under some constellation
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 it
SimpleEntryPoint.java (text/plain), 1.87 KB, created by
Ivan Furnadjiev
on 2012-04-17 08:13:38 EDT
(
hide
)
Description:
Snippet to reproduce it
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2012-04-17 08:13:38 EDT
Size:
1.87 KB
patch
obsolete
>package rap.bugs.entrypoint; > >import org.eclipse.rwt.RWT; >import org.eclipse.rwt.internal.lifecycle.RWTLifeCycle; >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.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Text; > >@SuppressWarnings({ > "restriction" >}) >public class SimpleEntryPoint implements IEntryPoint { > > public int createUI() { > Display display = new Display(); > Shell shell = new Shell( display ); > shell.setText( "Application Tester" ); > shell.setSize( 800, 600 ); > shell.setLocation( 20, 20 ); > createContent( shell ); > shell.open(); > if( RWT.getLifeCycle() instanceof RWTLifeCycle ) { > while( !shell.isDisposed() ) { > if( !display.readAndDispatch() ) { > display.sleep(); > } > } > display.dispose(); > } > return 0; > } > > @SuppressWarnings("serial") > private void createContent( Composite parent ) { > parent.setLayout( new GridLayout() ); > final Text text = new Text( parent, SWT.SINGLE | SWT.BORDER ); > text.setLayoutData( new GridData( 200, SWT.DEFAULT ) ); > text.setText( "foo bar" ); > text.setSelection( 4, 7 ); > // text.selectAll(); > Button button = new Button( parent, SWT.PUSH ); > button.setText( "setText and selectAll" ); > button.addSelectionListener( new SelectionAdapter() { > @Override > public void widgetSelected( SelectionEvent e ) { > text.setText( "aaa bbb" ); > text.setSelection( 4, 7 ); > // text.selectAll(); > text.setFocus(); > } > } ); > } >}
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 376957
: 214096