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 172161 Details for
Bug 191523
FileDialog crashes JVM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Snippet that crashes the JVM on Linux GTK
DeactivateBug.java (text/x-java), 2.04 KB, created by
Syed Atif
on 2010-06-17 17:06:41 EDT
(
hide
)
Description:
Snippet that crashes the JVM on Linux GTK
Filename:
MIME Type:
Creator:
Syed Atif
Created:
2010-06-17 17:06:41 EDT
Size:
2.04 KB
patch
obsolete
>package testpluginproject; > >import org.eclipse.swt.SWT; >import org.eclipse.swt.events.SelectionEvent; >import org.eclipse.swt.events.SelectionListener; >import org.eclipse.swt.events.ShellEvent; >import org.eclipse.swt.events.ShellListener; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Shell; > >public class DeactivateBug { > > public DeactivateBug() { > } > > public void run() { > final Display display = new Display(); > Shell parentShell = new Shell(display); > parentShell.setText("Parent shell"); > > parentShell.setLayout(new GridLayout()); > Button button = new Button(parentShell, SWT.NONE); > button.setText("Open problem-causing shell"); > button.addSelectionListener(new SelectionListener() { > public void widgetDefaultSelected(SelectionEvent e) { > } > > public void widgetSelected(SelectionEvent e) { > openChildShell(display); > } > }); > > parentShell.open(); > > while (!parentShell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > > parentShell.dispose(); > display.dispose(); > } > > private void openChildShell(final Display display) { > final Shell shell = new Shell(display, SWT.ON_TOP | SWT.RESIZE); > > shell.setLayout(new FillLayout()); > Label label = new Label(shell, SWT.NONE); > label.setText("This is a test"); > > shell.addShellListener(new ShellListener() { > > @Override > public void shellIconified(ShellEvent e) { > } > > @Override > public void shellDeiconified(ShellEvent e) { > } > > @Override > public void shellDeactivated(ShellEvent e) { > shell.close(); > shell.dispose(); > } > > @Override > public void shellClosed(ShellEvent e) { > } > > @Override > public void shellActivated(ShellEvent e) { > } > }); > > shell.open(); > } > > public static void main(String[] args) { > DeactivateBug bug = new DeactivateBug(); > bug.run(); > } >}
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 191523
:
70533
| 172161