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