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 177391 Details for
Bug 323570
Shell activate order problem
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]
patch to create snippet for the issue
wizard_spippet_patch.txt (text/plain), 2.87 KB, created by
Yury
on 2010-08-25 04:19:28 EDT
(
hide
)
Description:
patch to create snippet for the issue
Filename:
MIME Type:
Creator:
Yury
Created:
2010-08-25 04:19:28 EDT
Size:
2.87 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.demo >Index: src/org/eclipse/rap/demo/wizard/ComplaintsPage.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/wizard/ComplaintsPage.java,v >retrieving revision 1.4 >diff -u -r1.4 ComplaintsPage.java >--- src/org/eclipse/rap/demo/wizard/ComplaintsPage.java 12 Jun 2008 14:00:46 -0000 1.4 >+++ src/org/eclipse/rap/demo/wizard/ComplaintsPage.java 25 Aug 2010 08:13:08 -0000 >@@ -11,6 +11,13 @@ > > package org.eclipse.rap.demo.wizard; > >+import java.lang.reflect.InvocationTargetException; >+ >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.jface.dialogs.Dialog; >+import org.eclipse.jface.dialogs.MessageDialog; >+import org.eclipse.jface.operation.IRunnableContext; >+import org.eclipse.jface.operation.IRunnableWithProgress; > import org.eclipse.jface.wizard.IWizardPage; > import org.eclipse.jface.wizard.WizardPage; > import org.eclipse.swt.SWT; >@@ -60,6 +67,47 @@ > setErrorMessage( null ); > } > } ); >+ Button runButton = new Button(composite, SWT.PUSH); >+ runButton.setText( "Run button" ); >+ final Shell shell = getShell(); >+ final IRunnableContext context = getWizard().getContainer(); >+ runButton.addSelectionListener( new SelectionAdapter() { >+ >+ public void widgetSelected( SelectionEvent e ) { >+ IRunnableWithProgress runnable = new IRunnableWithProgress() >+ { >+ >+ public void run( IProgressMonitor monitor ) >+ throws InvocationTargetException, InterruptedException >+ { >+ monitor.worked(50); >+ shell.getDisplay().syncExec( new Runnable() { >+ >+ public void run() { >+ Dialog dlg = new ProgressDialog(shell); >+ dlg.setBlockOnOpen( false ); >+ dlg.open(); >+ } >+ }); >+ for (int i = 1; i <= 5; i++) >+ { >+ monitor.worked( 10*i ); >+ Thread.sleep( 500 ); >+ } >+ monitor.done(); >+ } >+ }; >+ try { >+ context.run( true, false, runnable ); >+ } >+ catch( InvocationTargetException ignored ) { >+ } >+ catch( InterruptedException ignored ) { >+ } >+ MessageDialog.openInformation(getShell(), "Title", "Done!"); >+ } >+ >+ }); > setControl( composite ); > } > >@@ -79,4 +127,15 @@ > setErrorMessage( "You need to select at least one entry" ); > return false; > } >+ >+ class ProgressDialog >+ extends Dialog >+ { >+ >+ protected ProgressDialog( Shell parentShell ) { >+ super( parentShell ); >+ setShellStyle((getShellStyle() | SWT.APPLICATION_MODAL) & ~SWT.CLOSE); >+ } >+ >+ } > } >\ No newline at end of file
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 323570
: 177391 |
177523