From 6b5c69178fe735e333ee8885725d9fe6d6d4c463 Mon Sep 17 00:00:00 2001 From: fbecker Date: Wed, 2 Mar 2011 19:39:46 +0000 Subject: RESOLVED - bug 333075: Updating of repo configuration failed https://bugs.eclipse.org/bugs/show_bug.cgi?id=333075 --- .../bugzilla/core/BugzillaTaskDataHandler.java | 47 ++-------------------- .../mylyn/internal/bugzilla/core/Messages.java | 4 -- .../internal/bugzilla/core/messages.properties | 2 - 3 files changed, 3 insertions(+), 50 deletions(-) (limited to 'org.eclipse.mylyn.bugzilla.core') diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java index dfecc48f1..6deac2540 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java @@ -23,9 +23,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.core.runtime.jobs.Job; import org.eclipse.mylyn.commons.net.AuthenticationCredentials; import org.eclipse.mylyn.commons.net.AuthenticationType; import org.eclipse.mylyn.commons.net.Policy; @@ -41,7 +39,6 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper; import org.eclipse.mylyn.tasks.core.data.TaskData; import org.eclipse.mylyn.tasks.core.data.TaskDataCollector; import org.eclipse.mylyn.tasks.core.data.TaskMapper; -import org.eclipse.mylyn.tasks.core.sync.TaskJob; /** * @author Mik Kersten @@ -343,47 +340,9 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler { throw collectionException[0]; } if (updateConfig[0] != null) { -// SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1); -// client.getRepositoryConfiguration(subMonitor, null); -// subMonitor.done(); - - // async. Update the Repository Configuration - TaskJob updateJob = new TaskJob(Messages.BugzillaTaskDataHandler_Refreshing_repository_configuration) { - - private IStatus error; - - @Override - protected IStatus run(IProgressMonitor monitor) { - monitor = SubMonitor.convert(monitor); - monitor.beginTask(Messages.BugzillaTaskDataHandler_Receiving_configuration, - IProgressMonitor.UNKNOWN); - try { - try { - client.getRepositoryConfiguration(monitor, null); - } catch (CoreException e) { - error = e.getStatus(); - } catch (IOException e) { - error = new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, - RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e); - } - } finally { - monitor.done(); - } - return Status.OK_STATUS; - } - - @Override - public boolean belongsTo(Object family) { - return family == repository; - } - - @Override - public IStatus getStatus() { - return error; - } - }; - updateJob.setPriority(Job.INTERACTIVE); - updateJob.schedule(); + SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1); + client.getRepositoryConfiguration(subMonitor, null); + subMonitor.done(); } } catch (IOException e) { throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java index b8232aa9d..2444ed807 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java @@ -261,12 +261,8 @@ public class Messages extends NLS { public static String BugzillaTaskAttachmentHandler_unable_to_submit_attachment; - public static String BugzillaTaskDataHandler_Receiving_configuration; - public static String BugzillaTaskDataHandler_Receiving_tasks; - public static String BugzillaTaskDataHandler_Refreshing_repository_configuration; - public static String BugzillaTaskDataHandler_Submitting_task; public static String BugzillaTaskDataHandler_updating_attachment; diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties index be56b5226..600dfc7ff 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties @@ -132,9 +132,7 @@ BugzillaTaskAttachmentHandler_Getting_attachment=Getting attachment BugzillaTaskAttachmentHandler_Sending_attachment=Sending attachment BugzillaTaskAttachmentHandler_unable_to_submit_attachment=Unable to submit attachment -BugzillaTaskDataHandler_Receiving_configuration=Receiving configuration BugzillaTaskDataHandler_Receiving_tasks=Receiving tasks -BugzillaTaskDataHandler_Refreshing_repository_configuration=Refreshing repository configuration BugzillaTaskDataHandler_Submitting_task=Submitting task BugzillaTaskDataHandler_updating_attachment=Updating Attachment -- cgit v1.2.3