Community
Participate
Working Groups
There is new support to handle the case of running a runnable with fork=false. The method is IProgressService.runInUI(). See the javadoc for this method for more details. If you are not sure about which scheduling rule to use then use the workspace root.
There is actually just one use of false, false in the class AntTargetTab.
Set to only lock on the particular Ant buildfile that we are getting the targets for. Changes in AntTargetsTab.
Please verify Kevin.
I've verified the fix since issues got uncovered when using runInUI while there is a modal dialog up. In the case of AntTargetsTab there is no modal dialog up, the operation is executed before the dialog shows up. Therefore runInUI works fine.
There is one improvement with the code below you are using the workbenchwindow as the runnable context. This avoids that a progress dialog briefly shows up before the launch config dialog: IRunnableContext context= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (context == null) context= getLaunchConfigurationDialog(); PlatformUI.getWorkbench().getProgressService().runInUI(context, operation, AntUtil.getFileForLocation(expandedLocation, null)); Here is the full patch: Index: AntTargetsTab.java =================================================================== RCS file: /home/eclipse/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTargetsTab.java,v retrieving revision 1.30 diff -u -r1.30 AntTargetsTab.java --- AntTargetsTab.java 24 May 2004 21:31:20 -0000 1.30 +++ AntTargetsTab.java 25 May 2004 11:19:06 -0000 @@ -35,6 +35,7 @@ import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTableViewer; @@ -61,6 +62,7 @@ import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants; import org.eclipse.ui.help.WorkbenchHelp; @@ -486,8 +488,10 @@ } } }; - - PlatformUI.getWorkbench().getProgressService ().runInUI(getLaunchConfigurationDialog(), operation, AntUtil.getFileForLocation(expandedLocation, null)); + IRunnableContext context= PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (context == null) + context= getLaunchConfigurationDialog (); + PlatformUI.getWorkbench().getProgressService ().runInUI(context, operation, AntUtil.getFileForLocation(expandedLocation, null)); } catch (CoreException ce) { exceptions[0]= ce; } catch (InvocationTargetException e) {
Thanks Erich. Patch applied and released.
verified, DarinS please update build notes
Build notes updated. Thanks.