[jbosstools-issues] [JBoss JIRA] (JBIDE-15941) Progress of deleting applications is not shown

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Wed Nov 13 10:59:06 EST 2013


    [ https://issues.jboss.org/browse/JBIDE-15941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923240#comment-12923240 ] 

Andre Dietisheim commented on JBIDE-15941:
------------------------------------------

The label (which should display: "Deleting application XXX") is not updated because I'm using the wrong method on the monitor to update the label:

{code:title=DeleteApplicationsJob}
	@Override
	protected IStatus doRun(IProgressMonitor monitor) {
		int totalWork = applications.size();
		monitor.beginTask("Deleting OpenShift Application(s)...", totalWork);
		for (final IApplication application : applications) {
			final String appName = application.getName();
			try {
				if (monitor.isCanceled()) {
					return Status.CANCEL_STATUS;
				}
				monitor.subTask("Deleting Application " + application.getName());
				application.destroy();
				monitor.worked(1);
			} catch (OpenShiftException e) {
				return OpenShiftUIActivator.createErrorStatus(
						NLS.bind("Failed to delete application \"{0}\"", appName), e);
			} finally {
				monitor.done();
			}
		}
		return Status.OK_STATUS;
	}
{code}

I should use *monitor#setTaskName* instead of *monitor#subTask*

updating the work that's done looks correct to me at first sight. The job is calling *monitor.worked(1)*
                
> Progress of deleting applications is not shown
> ----------------------------------------------
>
>                 Key: JBIDE-15941
>                 URL: https://issues.jboss.org/browse/JBIDE-15941
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.1.1.Beta1
>            Reporter: Marián Labuda
>            Assignee: Andre Dietisheim
>            Priority: Minor
>             Fix For: 4.2.x
>
>         Attachments: delete1.png, delete2.png
>
>
> When deleting more applications at once (tried 2 and 3), there is a progress bar. For first application it shows correctly name. But for any other application (second, third...) there is missing text label and also missing percentage of progress. See attached images.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jbosstools-issues mailing list