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 11606 Details for
Bug 64937
[Progress] Using IProgressService.busyCursorWhile() from modal dialogs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test with the properties dialog
busyCursorWhileTest.txt (text/plain), 2.44 KB, created by
Tod Creasey
on 2004-06-04 14:12:19 EDT
(
hide
)
Description:
Test with the properties dialog
Filename:
MIME Type:
Creator:
Tod Creasey
Created:
2004-06-04 14:12:19 EDT
Size:
2.44 KB
patch
obsolete
>Index: PropertyDialog.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PropertyDialog.java,v >retrieving revision 1.13 >diff -u -r1.13 PropertyDialog.java >--- PropertyDialog.java 3 Dec 2003 20:21:09 -0000 1.13 >+++ PropertyDialog.java 4 Jun 2004 18:09:32 -0000 >@@ -10,10 +10,14 @@ > *******************************************************************************/ > package org.eclipse.ui.internal.dialogs; > >-import org.eclipse.swt.widgets.Shell; >+import java.lang.reflect.InvocationTargetException; > >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.jface.operation.IRunnableWithProgress; > import org.eclipse.jface.preference.PreferenceManager; > import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.PlatformUI; > > /** > * This dialog is created and shown when 'Properties' action is performed while >@@ -29,11 +33,12 @@ > /** > * The constructor. > */ >- public PropertyDialog(Shell parentShell, PreferenceManager mng, ISelection selection) { >+ public PropertyDialog(Shell parentShell, PreferenceManager mng, >+ ISelection selection) { > super(parentShell, mng); > setSelection(selection); > } >- >+ > /** > * Returns selection in the "Properties" action context. > */ >@@ -61,4 +66,39 @@ > protected void setSelectedNodePreference(String pageId) { > lastPropertyId = pageId; > } >-} >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.jface.preference.PreferenceDialog#okPressed() >+ */ >+ protected void okPressed() { >+ try { >+ PlatformUI.getWorkbench().getProgressService().busyCursorWhile( >+ new IRunnableWithProgress() { >+ /* >+ * (non-Javadoc) >+ * >+ * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor) >+ */ >+ public void run(IProgressMonitor monitor) >+ throws InvocationTargetException, >+ InterruptedException { >+ getDialogArea().getDisplay().syncExec(new Runnable(){ >+ /* (non-Javadoc) >+ * @see java.lang.Runnable#run() >+ */ >+ public void run() { >+ PropertyDialog.super.okPressed(); >+ System.out.println("Done"); >+ >+ } >+ }); >+ >+ } >+ }); >+ } catch (Exception e) { >+ e.printStackTrace(); >+ } >+ } >+} >\ 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 64937
:
11591
| 11606 |
11607
|
11620
|
11657
|
11663