Merged to eclipse-poky master. Thanks, Jessica
-----Original Message----- From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Ioana Grigoropol Sent: Wednesday, April 24, 2013 5:16 AM To: yocto@yoctoproject.org Subject: [yocto] [PATCH] [eclipse-poky][master]Display progress bar while running systemtap script [Yocto #4270] Signed-off-by: Ioana Grigoropol <ioanax.grigoro...@intel.com> --- .../sdk/remotetools/actions/SystemtapHandler.java | 35 ++++++++++---------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapHandler.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapHandler.java index 21bd3ef..87094ee 100644 --- a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapHandler.java +++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ac +++ tions/SystemtapHandler.java @@ -12,11 +12,12 @@ package org.yocto.sdk.remotetools.actions; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.handlers.HandlerUtil; -import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.progress.IProgressService; public class SystemtapHandler extends AbstractHandler { protected SystemtapSettingDialog setting; @@ -33,27 +34,27 @@ public class SystemtapHandler extends AbstractHandler { ); setting.open(); - if (!setting.isOKPressed()) - return false; String metadata_location = ((SystemtapSettingDialog)setting).getMetadataLocation(); String remote_host = ((SystemtapSettingDialog)setting).getRemoteHost(); String user_id = ((SystemtapSettingDialog)setting).getUserID(); String systemtap_script = ((SystemtapSettingDialog)setting).getSystemtapScript(); String systemtap_args = ((SystemtapSettingDialog)setting).getSystemtapArgs(); - - - SystemtapModel op=new SystemtapModel(metadata_location,remote_host, user_id, systemtap_script, - systemtap_args,window.getShell().getDisplay()); - try { - op.process(new NullProgressMonitor()); - return true; - }catch (Exception e) { - e.printStackTrace(); - MessageDialog.openError(window.getShell(), - "Systemtap", - e.getMessage()); + + if(setting.open() == BaseSettingDialog.OK) { + IProgressService progressService = PlatformUI.getWorkbench().getProgressService(); + SystemtapModel op = new SystemtapModel(metadata_location,remote_host, user_id, systemtap_script, + systemtap_args,window.getShell().getDisplay()); + try { + progressService.busyCursorWhile(op); + }catch (InterruptedException e) { + //user cancelled + }catch (Exception e) { + e.printStackTrace(); + MessageDialog.openError(window.getShell(), + "Systemtap", + e.getMessage()); + } } - return false; } -- 1.7.9.5 _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto