diff options
88 files changed, 317 insertions, 317 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/.classpath b/org.eclipse.mylyn.bugzilla.core/.classpath index ecb2bc3dc..d12be34be 100644 --- a/org.eclipse.mylyn.bugzilla.core/.classpath +++ b/org.eclipse.mylyn.bugzilla.core/.classpath @@ -3,7 +3,7 @@ <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> <accessrules> - <accessrule kind="discouraged" pattern="**/mylar/**/internal/**"/> + <accessrule kind="discouraged" pattern="**/mylyn/**/internal/**"/> <accessrule kind="accessible" pattern="**/internal/**"/> <accessrule kind="nonaccessible" pattern="**/System"/> </accessrules> diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java index 6b976a481..08eeabff5 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java @@ -25,7 +25,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Plugin; import org.eclipse.core.runtime.Status; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; import org.eclipse.mylyn.tasks.core.RepositoryTaskData; import org.eclipse.mylyn.tasks.core.TaskRepository; @@ -340,7 +340,7 @@ public class BugzillaCorePlugin extends Plugin { } } catch (Exception e) { - StatusManager.fail(e, "could not set platform options", false); + StatusHandler.fail(e, "could not set platform options", false); } } } diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java index 69bb9f152..7a302b501 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java @@ -28,7 +28,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Status; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; @@ -306,7 +306,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector { return true; } catch (UnsupportedEncodingException e) { // XXX throw CoreException instead? - StatusManager.fail(e, "Repository configured with unsupported encoding: " + StatusHandler.fail(e, "Repository configured with unsupported encoding: " + repository.getCharacterEncoding() + "\n\n Unable to determine changed tasks.", true); return false; } finally { @@ -425,7 +425,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector { try { return BugzillaClient.getBugUrlWithoutLogin(repositoryUrl, taskId); } catch (Exception ex) { - StatusManager.fail(ex, "Error constructing task url for " + repositoryUrl + " id:" + taskId, false); + StatusHandler.fail(ex, "Error constructing task url for " + repositoryUrl + " id:" + taskId, false); } return null; } 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 3c4d6ceaa..47a65618a 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 @@ -22,7 +22,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_OPERATION; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_REPORT_STATUS; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_RESOLUTION; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory; import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler; import org.eclipse.mylyn.tasks.core.RepositoryOperation; @@ -185,7 +185,7 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler { try { status = BUGZILLA_REPORT_STATUS.valueOf(bugReport.getStatus()); } catch (RuntimeException e) { - StatusManager.log(e, "Unrecognized status: " + bugReport.getStatus()); + StatusHandler.log(e, "Unrecognized status: " + bugReport.getStatus()); status = BUGZILLA_REPORT_STATUS.NEW; } switch (status) { diff --git a/org.eclipse.mylyn.bugzilla.ui/.classpath b/org.eclipse.mylyn.bugzilla.ui/.classpath index ddacaf769..a01a39733 100644 --- a/org.eclipse.mylyn.bugzilla.ui/.classpath +++ b/org.eclipse.mylyn.bugzilla.ui/.classpath @@ -6,8 +6,8 @@ <accessrule kind="accessible" pattern="**/TasksUiImages"/> <accessrule kind="accessible" pattern="**/TaskListColorsAndFonts"/> <accessrule kind="accessible" pattern="**/TaskListPreferenceConstants"/> - <accessrule kind="accessible" pattern="**/mylar/internal/bugzilla/**"/> - <accessrule kind="discouraged" pattern="**/mylar/**/internal/**"/> + <accessrule kind="accessible" pattern="**/mylyn/internal/bugzilla/**"/> + <accessrule kind="discouraged" pattern="**/mylyn/**/internal/**"/> <accessrule kind="accessible" pattern="**/internal/**"/> </accessrules> </classpathentry> diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java index cfafc88b8..8f5e23f5f 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java @@ -24,7 +24,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.ui.plugin.AbstractUIPlugin; @@ -222,7 +222,7 @@ public class BugzillaUiPlugin extends AbstractUIPlugin { try { config = BugzillaCorePlugin.getRepositoryConfiguration(repository, false); } catch (Exception e) { - StatusManager.fail(e, "Could not retrieve repository configuration for: " + repository, true); + StatusHandler.fail(e, "Could not retrieve repository configuration for: " + repository, true); return; } diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java index 6e8877783..98934cd2a 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java @@ -25,9 +25,9 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; import org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_OPERATION; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.RepositoryOperation; import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; @@ -354,7 +354,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor { try { operation = BUGZILLA_OPERATION.valueOf(repositoryOperation.getKnobName()); } catch (RuntimeException e) { - StatusManager.log(e, "Unrecognized operation: " + repositoryOperation.getKnobName()); + StatusHandler.log(e, "Unrecognized operation: " + repositoryOperation.getKnobName()); operation = null; } diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java index ab0266174..babf56828 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java @@ -27,7 +27,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; @@ -1198,7 +1198,7 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L connector.updateAttributes(repository, monitor); BugzillaUiPlugin.updateQueryOptions(repository, monitor); } catch (final CoreException ce) { - StatusManager.displayStatus("Update failed", ce.getStatus()); + StatusHandler.displayStatus("Update failed", ce.getStatus()); } finally { monitor.done(); } diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java index 7f06fe29c..a98352d1e 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java @@ -28,7 +28,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaStatus; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BugzillaServerVersion; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.mylyn.tasks.core.RepositoryTemplate; import org.eclipse.mylyn.tasks.core.TaskRepository; @@ -156,7 +156,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa } } if (i == -1) { - StatusManager.log("Could not resolve repository version: " + version, this); + StatusHandler.log("Could not resolve repository version: " + version, this); setVersion(IBugzillaConstants.BugzillaServerVersion.SERVER_218.toString()); } } @@ -357,7 +357,7 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa status = new BugzillaStatus(Status.WARNING, BugzillaCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_NETWORK, serverUrl, e.getMessage()); } - StatusManager.displayStatus("Validation failed", status); + StatusHandler.displayStatus("Validation failed", status); setStatus(status); } diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.java index 9d8462997..ce88aa5f8 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/NewBugzillaQueryWizard.java @@ -16,7 +16,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.wizard.Wizard; import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -82,7 +82,7 @@ public class NewBugzillaQueryWizard extends Wizard { try { getContainer().run(true, false, op); } catch (Exception e) { - StatusManager.log(e, "There was a problem executing the query refresh"); + StatusHandler.log(e, "There was a problem executing the query refresh"); } // } diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java index 30cf4e458..2872d0c88 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaProductPage.java @@ -45,7 +45,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryQuery; import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTask; import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.RepositoryTaskData; @@ -222,16 +222,16 @@ public class BugzillaProductPage extends WizardPage { connector.updateAttributes(repository, monitor); } catch (CoreException ce) { if (ce.getStatus().getException() instanceof GeneralSecurityException) { - StatusManager.fail(ce, + StatusHandler.fail(ce, "Bugzilla could not log you in to get the information you requested since login name or password is incorrect.\n" + "Please ensure proper configuration in " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ". ", true); } else if (ce.getStatus().getException() instanceof IOException) { - StatusManager.fail(ce, + StatusHandler.fail(ce, "Connection Error, please ensure proper configuration in " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".", true); } else { - StatusManager.fail(ce, "Error updating repository attributes for " + StatusHandler.fail(ce, "Error updating repository attributes for " + repository.getUrl(), true); } return; diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java index 0041b4e69..181a7c73b 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/SaxRepositoriesWriter.java @@ -22,8 +22,8 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stream.StreamResult; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.monitor.core.util.XmlStringConverter; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.xml.sax.ContentHandler; import org.xml.sax.DTDHandler; @@ -61,7 +61,7 @@ public class SaxRepositoriesWriter { new SAXSource(new RepositoriesWriter(), new TaskRepositoriesInputSource(repositories)), new StreamResult(outputStream)); } catch (TransformerException e) { - StatusManager.fail(e, "could not write repositories", false); + StatusHandler.fail(e, "could not write repositories", false); throw new IOException(e.getMessage()); } diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java index b0340d103..3058d5ff0 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskDataManager.java @@ -18,7 +18,7 @@ import java.util.Collections; import java.util.List; import java.util.Set; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; @@ -69,7 +69,7 @@ public class TaskDataManager { if (state != null) { state.setOldTaskData(data); } else { - StatusManager.log("Attempt to save old data when no new data exists.", this); + StatusHandler.log("Attempt to save old data when no new data exists.", this); } saveState(state); } @@ -133,7 +133,7 @@ public class TaskDataManager { clone = (RepositoryTaskData) ObjectCloner.deepCopy(state.getNewTaskData()); updateAttributeFactory(clone); } catch (Exception e) { - StatusManager.fail(e, "Error constructing modifiable task", false); + StatusHandler.fail(e, "Error constructing modifiable task", false); return null; } if (clone != null) { @@ -179,7 +179,7 @@ public class TaskDataManager { try { storage.put(state); } catch (Exception e) { - StatusManager.fail(e, "Error saving edits", false); + StatusHandler.fail(e, "Error saving edits", false); } } @@ -207,7 +207,7 @@ public class TaskDataManager { try { storage.put(state); } catch (Exception e) { - StatusManager.fail(e, "Discard edits failed.", false); + StatusHandler.fail(e, "Discard edits failed.", false); } } @@ -281,7 +281,7 @@ public class TaskDataManager { try { storage.start(); } catch (Exception e) { - StatusManager.fail(e, "Offline storage start failed", false); + StatusHandler.fail(e, "Offline storage start failed", false); } } @@ -289,7 +289,7 @@ public class TaskDataManager { try { storage.stop(); } catch (Exception e) { - StatusManager.fail(e, "Offline storage stop failed", false); + StatusHandler.fail(e, "Offline storage stop failed", false); } } @@ -316,7 +316,7 @@ public class TaskDataManager { } } catch (Exception e) { e.printStackTrace(); - StatusManager.fail(e, "Error saving offline data", false); + StatusHandler.fail(e, "Error saving offline data", false); } return state; } diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java index 9b734dabd..2d31c09ed 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java @@ -22,7 +22,7 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; import org.xml.sax.InputSource; @@ -63,13 +63,13 @@ public class TaskRepositoriesExternalizer { outputStream.close(); } catch (IOException e) { - StatusManager.fail(e, "Could not write: " + file.getAbsolutePath(), true); + StatusHandler.fail(e, "Could not write: " + file.getAbsolutePath(), true); } finally { if (outputStream != null) { try { outputStream.close(); } catch (IOException e) { - StatusManager.fail(e, "Unable to terminate output stream to repositories file.", false); + StatusHandler.fail(e, "Unable to terminate output stream to repositories file.", false); } } } @@ -90,14 +90,14 @@ public class TaskRepositoriesExternalizer { return contentHandler.getRepositories(); } catch (Throwable e) { file.renameTo(new File(file.getAbsolutePath() + "-save")); - StatusManager.log(e, "Error while reading context file"); + StatusHandler.log(e, "Error while reading context file"); return null; } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException e) { - StatusManager.fail(e, "Failed to close repositories input stream.", false); + StatusHandler.fail(e, "Failed to close repositories input stream.", false); } } } diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.java index bc21ca0b6..16f637415 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractAttachmentHandler.java @@ -24,8 +24,8 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.mylyn.context.core.ContextCorePlugin; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.TaskDataManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask.RepositoryTaskSyncState; /** @@ -92,7 +92,7 @@ public abstract class AbstractAttachmentHandler { try { in.close(); } catch (IOException e) { - StatusManager.fail(e, "Error closing attachment stream", false); + StatusHandler.fail(e, "Error closing attachment stream", false); } } } finally { @@ -193,7 +193,7 @@ public abstract class AbstractAttachmentHandler { try { out.close(); } catch (IOException e) { - StatusManager.fail(e, "Could not close context file", false); + StatusHandler.fail(e, "Could not close context file", false); } } } catch (FileNotFoundException e) { diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java index c54a2c40b..63e0ca743 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AttributeContainer.java @@ -17,7 +17,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; /** * Encapsulates attributes for task data. @@ -51,12 +51,12 @@ public class AttributeContainer implements Serializable { public void addAttribute(String key, RepositoryTaskAttribute attribute) { if (attributeFactory == null) { - StatusManager.log(ERROR_NO_ATTRIBUTE_FACTORY, this); + StatusHandler.log(ERROR_NO_ATTRIBUTE_FACTORY, this); return; } String mapped = attributeFactory.mapCommonAttributeKey(key); if(mapped == null) { - StatusManager.log("Mylar Error: mapped value for "+key+" returned null.", this); + StatusHandler.log("Mylar Error: mapped value for "+key+" returned null.", this); return; } if (!attributes.containsKey(mapped)) { attributeKeys.add(mapped); @@ -66,7 +66,7 @@ public class AttributeContainer implements Serializable { public RepositoryTaskAttribute getAttribute(String key) { if (attributeFactory == null) { - StatusManager.log(ERROR_NO_ATTRIBUTE_FACTORY, this); + StatusHandler.log(ERROR_NO_ATTRIBUTE_FACTORY, this); return null; } String mapped = attributeFactory.mapCommonAttributeKey(key); @@ -96,7 +96,7 @@ public class AttributeContainer implements Serializable { public void addAttributeValue(String key, String value) { if (attributeFactory == null) { - StatusManager.log(ERROR_NO_ATTRIBUTE_FACTORY, this); + StatusHandler.log(ERROR_NO_ATTRIBUTE_FACTORY, this); return; } RepositoryTaskAttribute attrib = getAttribute(key); @@ -115,7 +115,7 @@ public class AttributeContainer implements Serializable { */ public void setAttributeValue(String key, String value) { if (attributeFactory == null) { - StatusManager.log(ERROR_NO_ATTRIBUTE_FACTORY, this); + StatusHandler.log(ERROR_NO_ATTRIBUTE_FACTORY, this); return; } RepositoryTaskAttribute attrib = getAttribute(key); @@ -128,7 +128,7 @@ public class AttributeContainer implements Serializable { public String getAttributeValue(String key) { if (attributeFactory == null) { - StatusManager.log(ERROR_NO_ATTRIBUTE_FACTORY, this); + StatusHandler.log(ERROR_NO_ATTRIBUTE_FACTORY, this); return ""; } String returnValue = ""; @@ -142,7 +142,7 @@ public class AttributeContainer implements Serializable { public List<String> getAttributeValues(String key) { List<String> returnValue = new ArrayList<String>(); if (attributeFactory == null) { - StatusManager.log(ERROR_NO_ATTRIBUTE_FACTORY, this); + StatusHandler.log(ERROR_NO_ATTRIBUTE_FACTORY, this); return returnValue; } RepositoryTaskAttribute attrib = getAttribute(key); diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java index f2dc540a4..4154c479e 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java @@ -22,12 +22,12 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArraySet; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.LocalTask; import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil; import org.eclipse.mylyn.internal.tasks.core.TaskArchive; import org.eclipse.mylyn.internal.tasks.core.TaskCategory; import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory; +import org.eclipse.mylyn.monitor.core.StatusHandler; /** * Stores and manages task list elements and their containment hierarchy. @@ -620,7 +620,7 @@ public class TaskList { delta.add(new TaskContainerDelta(task, kind)); listener.containersChanged(delta); } catch (Throwable t) { - StatusManager.fail(t, "Notification failed for: " + listener, false); + StatusHandler.fail(t, "Notification failed for: " + listener, false); } } } @@ -638,7 +638,7 @@ public class TaskList { try { listener.containersChanged(delta); } catch (Throwable t) { - StatusManager.fail(t, "notification failed for: " + listener, false); + StatusHandler.fail(t, "notification failed for: " + listener, false); } } } diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java index 362eb04be..b691fb869 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java @@ -22,8 +22,8 @@ import java.util.TimeZone; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.Platform; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.web.core.WebClientUtil; /** @@ -239,7 +239,7 @@ public class TaskRepository { } isCachedUserName = false; } catch (CoreException e) { - StatusManager.fail(e, "could not flush authorization credentials", true); + StatusHandler.fail(e, "could not flush authorization credentials", true); } } } @@ -259,7 +259,7 @@ public class TaskRepository { headlessCreds.putAll(map); } } catch (CoreException e) { - StatusManager.fail(e, "Could not set authorization credentials", true); + StatusHandler.fail(e, "Could not set authorization credentials", true); } } } @@ -273,7 +273,7 @@ public class TaskRepository { } catch (MalformedURLException ex) { return Platform.getAuthorizationInfo(DEFAULT_URL, getUrl(), AUTH_SCHEME); } catch (Exception e) { - StatusManager.fail(e, "Could not retrieve authentication credentials", false); + StatusHandler.fail(e, "Could not retrieve authentication credentials", false); } } else { Map<String, String> headlessCreds = credentials.get(getUrl()); diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java index 848f7c9ba..a9c327948 100644 --- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java +++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepositoryManager.java @@ -22,8 +22,8 @@ import java.util.Map; import java.util.Set; import org.eclipse.core.runtime.Platform; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.TaskRepositoriesExternalizer; +import org.eclipse.mylyn.monitor.core.StatusHandler; /** * Provides facilities for managing the lifecycle of and access to task repositories. @@ -236,7 +236,7 @@ public class TaskRepositoryManager { try { listener.repositoriesRead(); } catch (Throwable t) { - StatusManager.fail(t, "repository listener failed", false); + StatusHandler.fail(t, "repository listener failed", false); } } return repositoryMap; @@ -278,7 +278,7 @@ public class TaskRepositoryManager { } } } catch (Throwable t) { - StatusManager.fail(t, "could not load repositories", false); + StatusHandler.fail(t, "could not load repositories", false); } } @@ -356,7 +356,7 @@ public class TaskRepositoryManager { File repositoriesFile = new File(destinationPath); externalizer.writeRepositoriesToXML(repositoriesToWrite, repositoriesFile); } catch (Throwable t) { - StatusManager.fail(t, "could not save repositories", false); + StatusHandler.fail(t, "could not save repositories", false); return false; } return true; diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java index c40aea4ef..e69448f2a 100644 --- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java +++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskList06DataMigrationTest.java @@ -20,10 +20,10 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.mylyn.internal.context.core.InteractionContextManager; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.monitor.core.util.ZipFileUtil; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; import org.eclipse.mylyn.internal.tasks.ui.WorkspaceAwareContextStore; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -168,7 +168,7 @@ class TaskListDataMigration implements IRunnableWithProgress { return false; if (newTasklistFile.exists()) { if (!newTasklistFile.delete()) { - StatusManager.fail(null, "Could not overwrite tasklist", false); + StatusHandler.fail(null, "Could not overwrite tasklist", false); return false; } } @@ -178,12 +178,12 @@ class TaskListDataMigration implements IRunnableWithProgress { monitor.beginTask("Migrate Tasklist Data", 1); ZipFileUtil.createZipFile(newTasklistFile, filesToZip, new SubProgressMonitor(monitor, 1)); if (!oldTasklistFile.delete()) { - StatusManager.fail(null, "Could not remove old tasklist.", false); + StatusHandler.fail(null, "Could not remove old tasklist.", false); return false; } monitor.worked(1); } catch (Exception e) { - StatusManager.fail(e, "Error occurred while migrating old tasklist: " + e.getMessage(), true); + StatusHandler.fail(e, "Error occurred while migrating old tasklist: " + e.getMessage(), true); return false; } finally { monitor.done(); @@ -198,7 +198,7 @@ class TaskListDataMigration implements IRunnableWithProgress { return false; if (newRepositoriesFile.exists()) { if (!newRepositoriesFile.delete()) { - StatusManager.fail(null, + StatusHandler.fail(null, "Could not overwrite repositories file. Check read/write permission on data directory.", false); return false; } @@ -209,7 +209,7 @@ class TaskListDataMigration implements IRunnableWithProgress { monitor.beginTask("Migrate Repository Data", 1); ZipFileUtil.createZipFile(newRepositoriesFile, filesToZip, new SubProgressMonitor(monitor, 1)); if (!oldRepositoriesFile.delete()) { - StatusManager + StatusHandler .fail( null, "Could not remove old repositories file. Check read/write permission on data directory.", @@ -218,7 +218,7 @@ class TaskListDataMigration implements IRunnableWithProgress { } monitor.worked(1); } catch (Exception e) { - StatusManager.fail(e, "Error occurred while migrating old repositories data: " + e.getMessage(), true); + StatusHandler.fail(e, "Error occurred while migrating old repositories data: " + e.getMessage(), true); return false; } finally { monitor.done(); @@ -242,7 +242,7 @@ class TaskListDataMigration implements IRunnableWithProgress { File contextsFolder = new File(dataDirectory, WorkspaceAwareContextStore.CONTEXTS_DIRECTORY); if (!contextsFolder.exists()) { if (!contextsFolder.mkdir()) { - StatusManager.fail(null, + StatusHandler.fail(null, "Could not create contexts folder. Check read/write permission on data directory.", false); return false; } @@ -253,7 +253,7 @@ class TaskListDataMigration implements IRunnableWithProgress { File newContextFile = new File(contextsFolder, file.getName()+".zip"); if (newContextFile.exists()) { if (!newContextFile.delete()) { - StatusManager.fail(null, + StatusHandler.fail(null, "Could not overwrite context file. Check read/write permission on data directory.", false); return false; @@ -261,14 +261,14 @@ class TaskListDataMigration implements IRunnableWithProgress { } ZipFileUtil.createZipFile(newContextFile, filesToZip, new SubProgressMonitor(monitor, 1)); if (!file.delete()) { - StatusManager.fail(null, + StatusHandler.fail(null, "Could not remove old context file. Check read/write permission on data directory.", false); return false; } monitor.worked(1); } } catch (Exception e) { - StatusManager.fail(e, "Error occurred while migrating old repositories data: " + e.getMessage(), true); + StatusHandler.fail(e, "Error occurred while migrating old repositories data: " + e.getMessage(), true); return false; } finally { monitor.done(); @@ -284,7 +284,7 @@ class TaskListDataMigration implements IRunnableWithProgress { File contextsFolder = new File(dataDirectory, WorkspaceAwareContextStore.CONTEXTS_DIRECTORY); if (!contextsFolder.exists()) { if (!contextsFolder.mkdir()) { - StatusManager.fail(null, + StatusHandler.fail(null, "Could not create contexts folder. Check read/write permission on data directory.", false); return false; } @@ -294,7 +294,7 @@ class TaskListDataMigration implements IRunnableWithProgress { if (newActivityFile.exists()) { if (!newActivityFile.delete()) { - StatusManager.fail(null, + StatusHandler.fail(null, "Could not overwrite activity file. Check read/write permission on data directory.", false); return false; } @@ -305,7 +305,7 @@ class TaskListDataMigration implements IRunnableWithProgress { monitor.beginTask("Migrate Activity Data", 1); ZipFileUtil.createZipFile(newActivityFile, filesToZip, new SubProgressMonitor(monitor, 1)); if (!oldActivityFile.delete()) { - StatusManager + StatusHandler .fail( null, "Could not remove old activity file. Check read/write permission on data directory.", @@ -314,7 +314,7 @@ class TaskListDataMigration implements IRunnableWithProgress { } monitor.worked(1); } catch (Exception e) { - StatusManager.fail(e, "Error occurred while migrating old activity data: " + e.getMessage(), true); + StatusHandler.fail(e, "Error occurred while migrating old activity data: " + e.getMessage(), true); return false; } finally { monitor.done(); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java index 267da3da0..973c08166 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/AddExistingTaskJob.java @@ -10,9 +10,9 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.TaskCategory; import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskCategory; @@ -106,7 +106,7 @@ public class AddExistingTaskJob extends Job { }); } } catch (final CoreException e) { - StatusManager.fail(e.getStatus().getException(), e.getMessage(), true); + StatusHandler.fail(e.getStatus().getException(), e.getMessage(), true); } finally { monitor.done(); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.java index 4d0abc379..be2f73f61 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ContextUiUtil.java @@ -16,7 +16,7 @@ import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -73,9 +73,9 @@ public class ContextUiUtil { } } catch (InvocationTargetException e) { if (e.getCause() instanceof CoreException) { - StatusManager.displayStatus(ITasksUiConstants.TITLE_DIALOG, ((CoreException) e.getCause()).getStatus()); + StatusHandler.displayStatus(ITasksUiConstants.TITLE_DIALOG, ((CoreException) e.getCause()).getStatus()); } else { - StatusManager.fail(e, "Unexpected error while attaching context", true); + StatusHandler.fail(e, "Unexpected error while attaching context", true); } return false; } catch (InterruptedException ignored) { @@ -127,9 +127,9 @@ public class ContextUiUtil { } } catch (InvocationTargetException e) { if (e.getCause() instanceof CoreException) { - StatusManager.displayStatus(ITasksUiConstants.TITLE_DIALOG, ((CoreException) e.getCause()).getStatus()); + StatusHandler.displayStatus(ITasksUiConstants.TITLE_DIALOG, ((CoreException) e.getCause()).getStatus()); } else { - StatusManager.fail(e, "Unexpected error while attaching context", true); + StatusHandler.fail(e, "Unexpected error while attaching context", true); } return false; } catch (InterruptedException ignored) { diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java index a44c9a85a..fd684fa27 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineCachingStorage.java @@ -20,9 +20,9 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.ITaskDataStorage; import org.eclipse.mylyn.internal.tasks.core.TaskDataState; +import org.eclipse.mylyn.monitor.core.StatusHandler; /** * Least Recently Used (LRU) cache @@ -223,7 +223,7 @@ public class OfflineCachingStorage implements ITaskDataStorage { try { persistToStorage(); } catch (Throwable t) { - StatusManager.fail(t, "Error saving offline cache", false); + StatusHandler.fail(t, "Error saving offline cache", false); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java index b5f0d0bd5..f64da8ea2 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OfflineFileStorage.java @@ -30,9 +30,9 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.ITaskDataStorage; import org.eclipse.mylyn.internal.tasks.core.TaskDataState; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory; import org.eclipse.mylyn.tasks.core.RepositoryAttachment; import org.eclipse.mylyn.tasks.core.RepositoryOperation; @@ -217,7 +217,7 @@ public class OfflineFileStorage implements ITaskDataStorage { } } } catch (Exception e) { - StatusManager.fail(e, "Error retrieving offline data", false); + StatusHandler.fail(e, "Error retrieving offline data", false); } finally { try { if (lock != null && lock.isValid()) { @@ -227,7 +227,7 @@ public class OfflineFileStorage implements ITaskDataStorage { fileInputStream.close(); } } catch (IOException e) { - StatusManager.fail(e, "Error closing offline data input stream", false); + StatusHandler.fail(e, "Error closing offline data input stream", false); } } @@ -277,7 +277,7 @@ public class OfflineFileStorage implements ITaskDataStorage { } } } catch (Exception e) { - StatusManager.fail(e, "Error saving offline data", false); + StatusHandler.fail(e, "Error saving offline data", false); } finally { try { if (lock != null && lock.isValid()) { @@ -288,7 +288,7 @@ public class OfflineFileStorage implements ITaskDataStorage { fileOutputStream.close(); } } catch (IOException e) { - StatusManager.fail(e, "Error closing offline data output stream", false); + StatusHandler.fail(e, "Error closing offline data output stream", false); } } @@ -681,7 +681,7 @@ public class OfflineFileStorage implements ITaskDataStorage { // TODO: Remove folder if last file removed } catch (Exception e) { - StatusManager.fail(e, "Error removing offline data: " + repositoryUrl + "-" + id, false); + StatusHandler.fail(e, "Error removing offline data: " + repositoryUrl + "-" + id, false); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java index e6c9018e8..ef9ada85e 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/OpenRepositoryTaskJob.java @@ -17,7 +17,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler; import org.eclipse.mylyn.tasks.core.RepositoryTaskData; @@ -98,7 +98,7 @@ public class OpenRepositoryTaskJob extends Job { } catch (final CoreException e) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { - StatusManager.displayStatus("Unable to open task.", e.getStatus()); + StatusHandler.displayStatus("Unable to open task.", e.getStatus()); } }); } finally { diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java index 28e3e8834..d778cf0f5 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java @@ -14,8 +14,8 @@ import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.mylyn.internal.monitor.core.util.IStatusHandler; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.util.WebBrowserDialog; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; @@ -53,7 +53,7 @@ public class RepositoryAwareStatusHandler implements IStatusHandler { public void displayStatus(final String title, final IStatus status) { if (status.getCode() == RepositoryStatus.ERROR_INTERNAL) { - StatusManager.log(status); + StatusHandler.log(status); fail(status, true); return; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositorySynchronizationManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositorySynchronizationManager.java index 369e1eef8..7ec7871d1 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositorySynchronizationManager.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositorySynchronizationManager.java @@ -16,9 +16,9 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.jobs.IJobChangeListener; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.LocalTask; import org.eclipse.mylyn.internal.tasks.core.TaskDataManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -171,7 +171,7 @@ public class RepositorySynchronizationManager { RepositoryTaskSyncState status = repositoryTask.getSynchronizationState(); if (newTaskData == null) { - StatusManager.log("Download of " + repositoryTask.getSummary() + " from " + StatusHandler.log("Download of " + repositoryTask.getSummary() + " from " + repositoryTask.getRepositoryUrl() + " failed.", this); return false; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RetrieveTitleFromUrlJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RetrieveTitleFromUrlJob.java index 5b0c15a81..4e7c84969 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RetrieveTitleFromUrlJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RetrieveTitleFromUrlJob.java @@ -14,7 +14,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.swt.SWT; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.browser.TitleEvent; @@ -72,7 +72,7 @@ public abstract class RetrieveTitleFromUrlJob extends Job implements TitleListen try { Thread.sleep(SLEEP_INTERVAL_MILLIS); } catch (InterruptedException e) { - StatusManager.fail(e, "Thread interrupted during sleep", false); + StatusHandler.fail(e, "Thread interrupted during sleep", false); } timeWaitedMillis += SLEEP_INTERVAL_MILLIS; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/SynchronizeQueryJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/SynchronizeQueryJob.java index 4bc6c36b8..53f3f9cb0 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/SynchronizeQueryJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/SynchronizeQueryJob.java @@ -23,8 +23,8 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.monitor.core.DateUtil; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -162,7 +162,7 @@ class SynchronizeQueryJob extends Job { if (status != null && isForced()) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { - StatusManager.displayStatus("Query Synchronization Failed", status); + StatusHandler.displayStatus("Query Synchronization Failed", status); } }); } @@ -178,7 +178,7 @@ class SynchronizeQueryJob extends Job { // do nothing } else if (resultingStatus.isOK()) { if (collector.getTasks().size() >= QueryHitCollector.MAX_HITS) { - StatusManager.log(QueryHitCollector.MAX_HITS_REACHED + "\n" + repositoryQuery.getSummary(), this); + StatusHandler.log(QueryHitCollector.MAX_HITS_REACHED + "\n" + repositoryQuery.getSummary(), this); } repositoryQuery.clear(); @@ -212,7 +212,7 @@ class SynchronizeQueryJob extends Job { if (isForced()) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { - StatusManager.displayStatus("Query Synchronization Failed", resultingStatus); + StatusHandler.displayStatus("Query Synchronization Failed", resultingStatus); } }); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/SynchronizeTaskJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/SynchronizeTaskJob.java index 1df7a9f2a..c7a1f97de 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/SynchronizeTaskJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/SynchronizeTaskJob.java @@ -24,7 +24,7 @@ import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler; @@ -141,7 +141,7 @@ class SynchronizeTaskJob extends Job { if (forced) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { - StatusManager.displayStatus("Task Synchronization Failed", e.getStatus()); + StatusHandler.displayStatus("Task Synchronization Failed", e.getStatus()); } }); } @@ -149,7 +149,7 @@ class SynchronizeTaskJob extends Job { } } catch (Exception e) { - StatusManager.fail(e, "Synchronization failed", false); + StatusHandler.fail(e, "Synchronization failed", false); } finally { monitor.done(); } @@ -190,7 +190,7 @@ class SynchronizeTaskJob extends Job { if (forced) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { - StatusManager.displayStatus("Task Synchronization Failed", e.getStatus()); + StatusHandler.displayStatus("Task Synchronization Failed", e.getStatus()); } }); } @@ -235,7 +235,7 @@ class SynchronizeTaskJob extends Job { if (forced) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { - StatusManager.displayStatus("Task Synchronization Failed", e.getStatus()); + StatusHandler.displayStatus("Task Synchronization Failed", e.getStatus()); } }); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java index f4b94b0f5..a4510e4a9 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskSearchPage.java @@ -19,7 +19,7 @@ import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; @@ -151,7 +151,7 @@ public class TaskSearchPage extends DialogPage implements ISearchPage { searchPage = new DeadSearchPage(repository); searchPage.setContainer(pageContainer); searchPage.createControl(fParentComposite); - StatusManager.log(e, "Error occurred while constructing search page for " + repository.getUrl() + " [" + StatusHandler.log(e, "Error occurred while constructing search page for " + repository.getUrl() + " [" + repository.getConnectorKind() + "]"); searchPage.getControl().setData(PAGE_KEY, searchPage); return searchPage.getControl(); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.java index 3a2797c9c..dee5c2aa6 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/WorkspaceAwareContextStore.java @@ -15,7 +15,7 @@ import java.io.File; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.mylyn.context.core.AbstractContextStore; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; /** @@ -41,19 +41,19 @@ public class WorkspaceAwareContextStore extends AbstractContextStore { File newDefaultDataDir = new File(TasksUiPlugin.getDefault().getDefaultDataDirectory()); File oldDefaultDataDir = new File(oldDefaultDataPath); if (newDefaultDataDir.exists() && oldDefaultDataDir.exists()) { - StatusManager.log("Legacy data folder detected: " + oldDefaultDataDir.getAbsolutePath(), this); + StatusHandler.log("Legacy data folder detected: " + oldDefaultDataDir.getAbsolutePath(), this); } else if (oldDefaultDataDir.exists() && !newDefaultDataDir.exists()) { File metadata = new File(ResourcesPlugin.getWorkspace().getRoot().getLocation().toString() + '/' + DIRECTORY_METADATA); if (!metadata.exists()) { if (!metadata.mkdirs()) { - StatusManager.log("Unable to create metadata folder: " + metadata.getAbsolutePath(), this); + StatusHandler.log("Unable to create metadata folder: " + metadata.getAbsolutePath(), this); } } if (metadata.exists()) { if (!oldDefaultDataDir.renameTo(new File(TasksUiPlugin.getDefault().getDefaultDataDirectory()))) { - StatusManager.log("Failed to migrate legacy data from " + oldDefaultDataDir.getAbsolutePath() + StatusHandler.log("Failed to migrate legacy data from " + oldDefaultDataDir.getAbsolutePath() + " to " + TasksUiPlugin.getDefault().getDefaultDataDirectory(), this); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java index e71287758..642cc5364 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java @@ -12,9 +12,9 @@ package org.eclipse.mylyn.internal.tasks.ui.actions; import org.eclipse.jface.action.Action; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.ITaskCommandIds; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.handlers.IHandlerService; @@ -41,7 +41,7 @@ public class AddRepositoryAction extends Action { try { handlerSvc.executeCommand(ITaskCommandIds.ADD_TASK_REPOSITORY, null); } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java index bada23d49..a4b235de7 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryTaskAction.java @@ -16,8 +16,8 @@ import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.wizards.AddExistingTaskWizard; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewPart; @@ -46,7 +46,7 @@ public class AddRepositoryTaskAction extends Action implements IViewActionDelega } } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java index 6379f24c1..71213a179 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java @@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.RepositoryAttachment; @@ -60,7 +60,7 @@ public class CopyAttachmentToClipboardJob extends Job { try { handler.downloadAttachment(repository, attachment, out, monitor); } catch (final CoreException e) { - StatusManager.displayStatus("Copy Attachment to Clipboard", e.getStatus()); + StatusHandler.displayStatus("Copy Attachment to Clipboard", e.getStatus()); return Status.OK_STATUS; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java index 7852b1a0f..4a279b8e9 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java @@ -17,7 +17,7 @@ import java.util.Set; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -85,7 +85,7 @@ public class DeleteTaskRepositoryAction extends AbstractTaskRepositoryAction { } } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java index 366cd3373..1ca78f312 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DownloadAttachmentJob.java @@ -17,7 +17,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.RepositoryAttachment; @@ -65,7 +65,7 @@ public class DownloadAttachmentJob extends Job { out = new FileOutputStream(this.targetFile); handler.downloadAttachment(repository, attachment, out, monitor); } catch (final CoreException e) { - StatusManager.displayStatus("Download Attachment", e.getStatus()); + StatusHandler.displayStatus("Download Attachment", e.getStatus()); return Status.OK_STATUS; } catch (IOException e) { return new RepositoryStatus(repository, IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, RepositoryStatus.ERROR_IO, @@ -75,7 +75,7 @@ public class DownloadAttachmentJob extends Job { try { out.close(); } catch (IOException e) { - StatusManager.fail(e, "Could not close attachment file: " + this.targetFile.getAbsolutePath(), + StatusHandler.fail(e, "Could not close attachment file: " + this.targetFile.getAbsolutePath(), false); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java index 8e8c7d213..831f93ad9 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java @@ -16,8 +16,8 @@ import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.wizards.NewQueryWizard; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewPart; @@ -46,7 +46,7 @@ public class NewQueryAction extends Action implements IViewActionDelegate { } } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java index a87d1114c..0e9e85d6a 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java @@ -15,11 +15,11 @@ import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.TaskCategory; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.swt.widgets.TreeItem; @@ -76,7 +76,7 @@ public class RemoveFromCategoryAction extends Action { } } } catch (NullPointerException npe) { - StatusManager.fail(npe, "Could not remove task from category, it may still be refreshing.", true); + StatusHandler.fail(npe, "Could not remove task from category, it may still be refreshing.", true); } } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java index 0e520866f..51752501f 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RestoreTaskListAction.java @@ -13,8 +13,8 @@ import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.wizard.IWizard; import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizard; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IViewActionDelegate; import org.eclipse.ui.IViewPart; @@ -43,7 +43,7 @@ public class RestoreTaskListAction implements IViewActionDelegate { } } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java index 68ee8763b..685b24307 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java @@ -12,9 +12,9 @@ package org.eclipse.mylyn.internal.tasks.ui.actions; import org.eclipse.jface.action.Action; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -37,7 +37,7 @@ public class TaskDeactivateAction extends Action { TasksUiPlugin.getTaskListManager().deactivateTask(task); } } catch (Exception e) { - StatusManager.log(e, " Closing task editor on task deactivation failed"); + StatusHandler.log(e, " Closing task editor on task deactivation failed"); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java index 8c7ecfe97..5064e1b75 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/RemoteTaskSelectionDialog.java @@ -34,11 +34,11 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryFilter; import org.eclipse.mylyn.internal.tasks.ui.ITaskCommandIds; import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider; import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -209,7 +209,7 @@ public class RemoteTaskSelectionDialog extends SelectionStatusDialog { hndSvc.executeCommand(ITaskCommandIds.ADD_TASK_REPOSITORY, null); repositoriesViewer.setInput(getTaskRepositories()); } catch (CommandException ex) { - StatusManager.fail(ex, ex.getMessage(), true); + StatusHandler.fail(ex, ex.getMessage(), true); } } }); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java index eb8b6f35f..09b5d9b46 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java @@ -16,8 +16,8 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.TaskComment; import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor; import org.eclipse.swt.graphics.Image; @@ -117,7 +117,7 @@ public class RepositoryTaskOutlinePage extends ContentOutlinePage { viewer.setComparer(new RepositoryTaskOutlineComparer()); viewer.expandAll(); } catch (Exception e) { - StatusManager.fail(e, "could not create bugzilla outline", true); + StatusHandler.fail(e, "could not create bugzilla outline", true); } getSite().getPage().addSelectionListener(selectionListener); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java index 4a5f2e565..5f028b456 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java @@ -20,13 +20,13 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.text.TextViewer; import org.eclipse.mylyn.context.core.ContextCorePlugin; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector; import org.eclipse.mylyn.internal.tasks.core.LocalTask; import org.eclipse.mylyn.internal.tasks.ui.RetrieveTitleFromUrlJob; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; import org.eclipse.mylyn.monitor.core.DateUtil; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.monitor.ui.MonitorUiPlugin; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.ITaskListChangeListener; @@ -423,7 +423,7 @@ public class TaskPlanningEditor extends TaskFormPage { try { creationDateString = DateFormat.getDateInstance(DateFormat.LONG).format(task.getCreationDate()); } catch (RuntimeException e) { - StatusManager.fail(e, "Could not format creation date", true); + StatusHandler.fail(e, "Could not format creation date", true); } addNameValueComp(statusComposite, "Created:", creationDateString, SWT.FLAT | SWT.READ_ONLY); @@ -500,7 +500,7 @@ public class TaskPlanningEditor extends TaskFormPage { job.schedule(); } catch (RuntimeException e) { - StatusManager.fail(e, "could not open task web page", false); + StatusHandler.fail(e, "could not open task web page", false); } } @@ -675,7 +675,7 @@ public class TaskPlanningEditor extends TaskFormPage { if (elapsedTimeString.equals("")) elapsedTimeString = NO_TIME_ELAPSED; } catch (RuntimeException e) { - StatusManager.fail(e, "Could not format elapsed time", true); + StatusHandler.fail(e, "Could not format elapsed time", true); } final Text elapsedTimeText = new Text(nameValueComp, SWT.READ_ONLY | SWT.FLAT); @@ -701,7 +701,7 @@ public class TaskPlanningEditor extends TaskFormPage { } } catch (RuntimeException e1) { - StatusManager.fail(e1, "Could not format elapsed time", true); + StatusHandler.fail(e1, "Could not format elapsed time", true); } elapsedTimeText.setText(elapsedTimeString); } @@ -781,7 +781,7 @@ public class TaskPlanningEditor extends TaskFormPage { try { completionDateString = DateFormat.getDateInstance(DateFormat.LONG).format(task.getCompletionDate()); } catch (RuntimeException e) { - StatusManager.fail(e, "Could not format date", true); + StatusHandler.fail(e, "Could not format date", true); return completionDateString; } return completionDateString; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java index c84556ad2..63565412a 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorInput.java @@ -17,7 +17,7 @@ import java.util.HashSet; import java.util.Set; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.TaskList; @@ -65,7 +65,7 @@ public class TaskActivityEditorInput implements IEditorInput { } catch (InvocationTargetException e) { // operation was canceled } catch (InterruptedException e) { - StatusManager.log(e, "Could not generate report"); + StatusHandler.log(e, "Could not generate report"); } completedTasks = completedTaskCollector.getTasks(); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java index 0f92ce6a8..da1d42ac8 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityEditorPart.java @@ -32,8 +32,8 @@ import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.monitor.core.DateUtil; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.swt.SWT; @@ -705,9 +705,9 @@ public class TaskActivityEditorPart extends EditorPart { writer.write("</body></html>"); writer.close(); } catch (FileNotFoundException e) { - StatusManager.log(e, "could not resolve file"); + StatusHandler.log(e, "could not resolve file"); } catch (IOException e) { - StatusManager.log(e, "could not write to file"); + StatusHandler.log(e, "could not write to file"); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.java index 664ad2d0d..00ba82e34 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskActivityWizard.java @@ -13,8 +13,8 @@ package org.eclipse.mylyn.internal.tasks.ui.planner; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.editors.TaskPlanningEditor; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.INewWizard; @@ -49,7 +49,7 @@ public class TaskActivityWizard extends Wizard implements INewWizard { .getSelectedContainers(), TasksUiPlugin.getTaskListManager().getTaskList()); page.openEditor(input, TaskPlanningEditor.ID_EDITOR_PLANNING); } catch (PartInitException ex) { - StatusManager.log(ex, "couldn't open summary editor"); + StatusHandler.log(ex, "couldn't open summary editor"); } return true; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.java index c1b5b5900..11ea75ff8 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskPlannerLabelProvider.java @@ -15,9 +15,9 @@ import java.text.DateFormat; import org.eclipse.jface.viewers.IColorProvider; import org.eclipse.jface.viewers.ITableLabelProvider; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.views.TaskElementLabelProvider; import org.eclipse.mylyn.monitor.core.DateUtil; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.swt.graphics.Color; @@ -55,7 +55,7 @@ public class TaskPlannerLabelProvider extends TaskElementLabelProvider implement if (task.getCreationDate() != null) { return DateFormat.getDateInstance(DateFormat.MEDIUM).format(task.getCreationDate()); } else { - StatusManager.log("Task has no creation date: " + task.getSummary(), this); + StatusHandler.log("Task has no creation date: " + task.getSummary(), this); return "[unknown]"; } case 4: @@ -71,7 +71,7 @@ public class TaskPlannerLabelProvider extends TaskElementLabelProvider implement } } } catch (RuntimeException e) { - StatusManager.fail(e, "Could not produce completed task label", false); + StatusHandler.fail(e, "Could not produce completed task label", false); return ""; } return null; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.java index 67148b8b4..ca71daaf8 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/TaskReportGenerator.java @@ -20,7 +20,7 @@ import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; @@ -64,7 +64,7 @@ public class TaskReportGenerator implements IRunnableWithProgress { } catch (InvocationTargetException e) { // operation was canceled } catch (InterruptedException e) { - StatusManager.log(e, "Could not collect tasks"); + StatusHandler.log(e, "Could not collect tasks"); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java index f7a3d7d8f..1678f6b13 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectPropertiesLinkProvider.java @@ -13,7 +13,7 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ProjectScope; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.IScopeContext; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; import org.eclipse.mylyn.tasks.ui.AbstractTaskRepositoryLinkProvider; @@ -72,7 +72,7 @@ public class ProjectPropertiesLinkProvider extends AbstractTaskRepositoryLinkPro projectNode.flush(); return true; } catch (BackingStoreException e) { - StatusManager.fail(e, "Failed to save task repository to project association preference", false); + StatusHandler.fail(e, "Failed to save task repository to project association preference", false); } } return false; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java index 311cee0f9..fd23fe6a6 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/properties/ProjectTaskRepositoryPage.java @@ -18,10 +18,10 @@ import org.eclipse.jface.viewers.DecoratingLabelProvider; import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.Viewer; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction; import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesSorter; import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.swt.SWT; @@ -178,7 +178,7 @@ public class ProjectTaskRepositoryPage extends PropertyPage { plugin.setRepositoryForResource(project, selectedRepository); } } catch (CoreException e) { - StatusManager.fail(e, "Unable to associate project with task repository", true); + StatusHandler.fail(e, "Unable to associate project with task repository", true); } } return true; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java index 1c0a7fd59..2bfbe749d 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/BackgroundSaveTimer.java @@ -10,9 +10,9 @@ *******************************************************************************/ package org.eclipse.mylyn.internal.tasks.ui.util; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.monitor.core.ActivityTimerThread; import org.eclipse.mylyn.monitor.core.IActivityTimerListener; +import org.eclipse.mylyn.monitor.core.StatusHandler; /** * Timer that periodically runs saveRequested() on its client as a job @@ -73,7 +73,7 @@ public class BackgroundSaveTimer implements IActivityTimerListener { listener.saveRequested(); // } } catch (RuntimeException e) { - StatusManager.log("Could not schedule save job", this); + StatusHandler.log("Could not schedule save job", this); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java index 44f6f191b..843e12bf4 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/DelegatingTaskExternalizer.java @@ -19,12 +19,12 @@ import java.util.Date; import java.util.List; import java.util.Locale; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil; import org.eclipse.mylyn.internal.tasks.core.TaskArchive; import org.eclipse.mylyn.internal.tasks.core.TaskCategory; import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException; import org.eclipse.mylyn.internal.tasks.core.UnfiledCategory; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskCategory; @@ -168,7 +168,7 @@ final class DelegatingTaskExternalizer { if (factory != null) { taskTagName = factory.getTaskElementName(); } else { - StatusManager.log("No externalizer for task: " + task, this); + StatusHandler.log("No externalizer for task: " + task, this); return null; // taskTagName = getTaskTagName(); } @@ -573,7 +573,7 @@ final class DelegatingTaskExternalizer { try { date = format.parse(dateString); } catch (ParseException e) { - StatusManager.fail(e, "Could not parse end date", false); + StatusHandler.fail(e, "Could not parse end date", false); } return date; } @@ -603,7 +603,7 @@ final class DelegatingTaskExternalizer { } } if (factory == null || queryTagName == null) { - StatusManager.log("No externalizer for query: " + query, this); + StatusHandler.log("No externalizer for query: " + query, this); return null; // queryTagName = getQueryTagNameForElement(query); } @@ -626,7 +626,7 @@ final class DelegatingTaskExternalizer { try { createQueryHitElement(hit, doc, node); } catch (Exception e) { - StatusManager.log(e, e.getMessage()); + StatusHandler.log(e, e.getMessage()); } } parent.appendChild(node); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportJob.java index 5bb15cbc2..8ea534c22 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskDataExportJob.java @@ -28,10 +28,10 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.mylyn.context.core.ContextCorePlugin; import org.eclipse.mylyn.internal.context.core.InteractionContextManager; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.monitor.core.util.ZipFileUtil; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; import org.eclipse.mylyn.internal.tasks.ui.WorkspaceAwareContextStore; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -127,7 +127,7 @@ public class TaskDataExportJob implements IRunnableWithProgress { destRepositoriesFile.delete(); } if (!copy(sourceRepositoriesFile, destRepositoriesFile)) { - StatusManager.fail(new Exception("Export Exception"), + StatusHandler.fail(new Exception("Export Exception"), "Could not export repositories file.", false); } monitor.worked(1); @@ -153,7 +153,7 @@ public class TaskDataExportJob implements IRunnableWithProgress { destTaskListFile.delete(); } if (!copy(sourceTaskListFile, destTaskListFile)) { - StatusManager.fail(new Exception("Export Exception"), "Could not export task list file.", + StatusHandler.fail(new Exception("Export Exception"), "Could not export task list file.", false); } monitor.worked(1); @@ -186,7 +186,7 @@ public class TaskDataExportJob implements IRunnableWithProgress { } } } catch (RuntimeException e) { - StatusManager.fail(e, "Could not export activity history context file", true); + StatusHandler.fail(e, "Could not export activity history context file", true); } } @@ -215,7 +215,7 @@ public class TaskDataExportJob implements IRunnableWithProgress { destTaskFile.delete(); } if (!copy(sourceTaskContextFile, destTaskFile) && !errorDisplayed) { - StatusManager.fail(new Exception("Export Exception: " + sourceTaskContextFile.getPath() + StatusHandler.fail(new Exception("Export Exception: " + sourceTaskContextFile.getPath() + " -> " + destTaskFile.getPath()), "Could not export one or more task context files.", true); errorDisplayed = true; @@ -234,7 +234,7 @@ public class TaskDataExportJob implements IRunnableWithProgress { ZipFileUtil.createZipFile(destZipFile, filesToZip, TasksUiPlugin.getDefault().getDataDirectory(), monitor); } catch (Exception e) { - StatusManager.fail(e, "Could not create zip file.", true); + StatusHandler.fail(e, "Could not create zip file.", true); } } monitor.done(); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java index 7d4424c34..3d3925554 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java @@ -30,8 +30,8 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.mylyn.context.core.ContextCorePlugin; import org.eclipse.mylyn.internal.context.core.InteractionContextManager; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.ITaskListChangeListener; import org.eclipse.mylyn.tasks.core.TaskContainerDelta; @@ -72,7 +72,7 @@ public class TaskListSaveManager implements ITaskListChangeListener, IBackground try { taskListSaverJob.runRequested(); } catch (Exception e) { - StatusManager.fail(e, "Could not auto save task list", false); + StatusHandler.fail(e, "Could not auto save task list", false); } } } @@ -103,7 +103,7 @@ public class TaskListSaveManager implements ITaskListChangeListener, IBackground internalSaveTaskList(); } } else if (PlatformUI.getWorkbench() != null && !PlatformUI.getWorkbench().isClosing()) { - StatusManager.log("Possible task list initialization failure, not saving list.", this); + StatusHandler.log("Possible task list initialization failure, not saving list.", this); if (!initializationWarningDialogShow) { initializationWarningDialogShow = true; PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { @@ -147,7 +147,7 @@ public class TaskListSaveManager implements ITaskListChangeListener, IBackground File destDir = new File(targetFolderPath + File.separator + currFile.getName()); if (!destDir.exists()) { if (!destDir.mkdir()) { - StatusManager.log("Unable to create destination context folder: " + StatusHandler.log("Unable to create destination context folder: " + destDir.getAbsolutePath(), this); continue; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java index 7964cafc4..1e9df78ba 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListWriter.java @@ -41,10 +41,10 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.TaskDataManager; import org.eclipse.mylyn.internal.tasks.core.TaskExternalizationException; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -111,7 +111,7 @@ public class TaskListWriter { db = dbf.newDocumentBuilder(); doc = db.newDocument(); } catch (ParserConfigurationException e) { - StatusManager.log(e, "could not create document"); + StatusHandler.log(e, "could not create document"); return; } @@ -136,7 +136,7 @@ public class TaskListWriter { delagatingExternalizer.createQueryElement(query, doc, root); // } } catch (Throwable t) { - StatusManager.fail(t, "Did not externalize: " + query.getSummary(), true); + StatusHandler.fail(t, "Did not externalize: " + query.getSummary(), true); } // if (element == null) { // StatusManager.log("Did not externalize: " + query, this); @@ -207,7 +207,7 @@ public class TaskListWriter { outputStream.closeEntry(); outputStream.close(); } catch (Exception fnfe) { - StatusManager.log(fnfe, "TaskList could not be found"); + StatusHandler.log(fnfe, "TaskList could not be found"); } } @@ -265,7 +265,7 @@ public class TaskListWriter { readVersion = root.getAttribute(ATTRIBUTE_VERSION); if (readVersion.equals(VALUE_VERSION_1_0_0)) { - StatusManager.log("version: " + readVersion + " not supported", this); + StatusHandler.log("version: " + readVersion + " not supported", this); } else { NodeList list = root.getChildNodes(); @@ -434,7 +434,7 @@ public class TaskListWriter { File save = new File(name); if (save.exists()) { if (!save.delete()) { - StatusManager.log("Unable to delete old backup tasklist file", this); + StatusHandler.log("Unable to delete old backup tasklist file", this); return; } } @@ -442,10 +442,10 @@ public class TaskListWriter { inFile.renameTo(new File(name)); } if (child == null) { - StatusManager.log(e, ITasksUiConstants.MESSAGE_RESTORE); + StatusHandler.log(e, ITasksUiConstants.MESSAGE_RESTORE); } else { e.printStackTrace(); // in case logging plug-in has not yet started - StatusManager.log(e, "Tasks may have been lost from " + child.getNodeName()); + StatusHandler.log(e, "Tasks may have been lost from " + child.getNodeName()); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java index 4a37207d2..405d376b6 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java @@ -21,9 +21,9 @@ import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.IDynamicSubMenuContributor; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTaskListFactory; import org.eclipse.mylyn.tasks.core.RepositoryTemplate; @@ -226,10 +226,10 @@ public class TasksUiExtensionReader { duplicateDetector.setKind(element.getAttribute(ATTR_KIND)); TasksUiPlugin.getDefault().addDuplicateDetector((AbstractDuplicateDetector) duplicateDetector); } else { - StatusManager.log("Could not load duplicate detector: " + obj.getClass().getCanonicalName(), null); + StatusHandler.log("Could not load duplicate detector: " + obj.getClass().getCanonicalName(), null); } } catch (CoreException e) { - StatusManager.log(e, "Could not load duplicate detector extension"); + StatusHandler.log(e, "Could not load duplicate detector extension"); } } @@ -240,11 +240,11 @@ public class TasksUiExtensionReader { TasksUiPlugin.getDefault().addRepositoryLinkProvider( (AbstractTaskRepositoryLinkProvider) repositoryLinkProvider); } else { - StatusManager.log("Could not load repository link provider: " + StatusHandler.log("Could not load repository link provider: " + repositoryLinkProvider.getClass().getCanonicalName(), null); } } catch (CoreException e) { - StatusManager.log(e, "Could not load repository link provider extension"); + StatusHandler.log(e, "Could not load repository link provider extension"); } } @@ -254,11 +254,11 @@ public class TasksUiExtensionReader { if (hyperlinkDetector instanceof IHyperlinkDetector) { TasksUiPlugin.getDefault().addTaskHyperlinkDetector((IHyperlinkDetector) hyperlinkDetector); } else { - StatusManager.log("Could not load detector: " + hyperlinkDetector.getClass().getCanonicalName(), + StatusHandler.log("Could not load detector: " + hyperlinkDetector.getClass().getCanonicalName(), null); } } catch (CoreException e) { - StatusManager.log(e, "Could not load tasklist hyperlink detector extension"); + StatusHandler.log(e, "Could not load tasklist hyperlink detector extension"); } } @@ -268,11 +268,11 @@ public class TasksUiExtensionReader { if (editor instanceof AbstractTaskEditorFactory) { TasksUiPlugin.getDefault().addContextEditor((AbstractTaskEditorFactory) editor); } else { - StatusManager.log("Could not load editor: " + editor.getClass().getCanonicalName() + StatusHandler.log("Could not load editor: " + editor.getClass().getCanonicalName() + " must implement " + AbstractTaskEditorFactory.class.getCanonicalName(), null); } } catch (CoreException e) { - StatusManager.log(e, "Could not load tasklist listener extension"); + StatusHandler.log(e, "Could not load tasklist listener extension"); } } @@ -290,11 +290,11 @@ public class TasksUiExtensionReader { repositoryConnector.setUserManaged(userManaged); } } else { - StatusManager.log("could not not load connector core: " + connectorCore, null); + StatusHandler.log("could not not load connector core: " + connectorCore, null); } } catch (CoreException e) { - StatusManager.log(e, "Could not load tasklist listener extension"); + StatusHandler.log(e, "Could not load tasklist listener extension"); } } @@ -331,11 +331,11 @@ public class TasksUiExtensionReader { } } } else { - StatusManager.log("could not not load connector ui: " + connectorUiObject, null); + StatusHandler.log("could not not load connector ui: " + connectorUiObject, null); } } catch (CoreException e) { - StatusManager.log(e, "Could not load tasklist listener extension"); + StatusHandler.log(e, "Could not load tasklist listener extension"); } } @@ -373,7 +373,7 @@ public class TasksUiExtensionReader { } } else { - StatusManager.log("Could not load repository template extension " + element.getName(), + StatusHandler.log("Could not load repository template extension " + element.getName(), TasksUiExtensionReader.class); } } @@ -386,12 +386,12 @@ public class TasksUiExtensionReader { TasksUiPlugin.getDefault().addDynamicPopupContributor(menuPath, (IDynamicSubMenuContributor) dynamicPopupContributor); } else { - StatusManager.log("Could not load dynamic popup menu: " + StatusHandler.log("Could not load dynamic popup menu: " + dynamicPopupContributor.getClass().getCanonicalName() + " must implement " + IDynamicSubMenuContributor.class.getCanonicalName(), null); } } catch (CoreException e) { - StatusManager.log(e, "Could not load dynamic popup extension"); + StatusHandler.log(e, "Could not load dynamic popup extension"); } } @@ -402,7 +402,7 @@ public class TasksUiExtensionReader { AbstractTaskListFactory externalizer = (AbstractTaskListFactory) externalizerObject; externalizers.add(externalizer); } else { - StatusManager.log("Could not load externalizer: " + StatusHandler.log("Could not load externalizer: " + externalizerObject.getClass().getCanonicalName() + " must implement " + AbstractTaskListFactory.class.getCanonicalName(), null); } @@ -419,7 +419,7 @@ public class TasksUiExtensionReader { // null); // } } catch (CoreException e) { - StatusManager.log(e, "Could not load task handler extension"); + StatusHandler.log(e, "Could not load task handler extension"); } } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractFilteredTree.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractFilteredTree.java index f7145413e..3f5cf8406 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractFilteredTree.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/AbstractFilteredTree.java @@ -18,8 +18,8 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.ToolBarManager; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; @@ -64,7 +64,7 @@ public abstract class AbstractFilteredTree extends FilteredTree { refreshJob = (Job) refreshField.get(this); refreshPolicy = new AdaptiveRefreshPolicy(refreshJob, super.getFilterControl()); } catch (Exception e) { - StatusManager.fail(e, "Could not get refresh job", false); + StatusHandler.fail(e, "Could not get refresh job", false); } setInitialText(""); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java index b6012dd93..43b52f270 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/ResetRepositoryConfigurationAction.java @@ -18,8 +18,8 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.actions.AbstractTaskRepositoryAction; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -57,7 +57,7 @@ public class ResetRepositoryConfigurationAction extends AbstractTaskRepositoryAc try { connector.updateAttributes(repository, monitor); } catch (CoreException ce) { - StatusManager.displayStatus("Error updating attributes", ce.getStatus()); + StatusHandler.displayStatus("Error updating attributes", ce.getStatus()); } monitor.done(); @@ -70,7 +70,7 @@ public class ResetRepositoryConfigurationAction extends AbstractTaskRepositoryAc } } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.java index 3c2a23cfe..8a09d59cc 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.java @@ -14,8 +14,8 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.mylyn.context.core.ContextCorePlugin; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.monitor.core.InteractionEvent; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -88,7 +88,7 @@ public class TaskActivationHistory { history.add(task); currentIndex = history.size() - 1; } catch (RuntimeException e) { - StatusManager.fail(e, "could not add task to history", false); + StatusHandler.fail(e, "could not add task to history", false); } } @@ -112,7 +112,7 @@ public class TaskActivationHistory { return null; } } catch (RuntimeException e) { - StatusManager.fail(e, "could not get previous task from history", false); + StatusHandler.fail(e, "could not get previous task from history", false); return null; } } @@ -130,7 +130,7 @@ public class TaskActivationHistory { return (currentIndex == 0 && !history.get(currentIndex).isActive()) || currentIndex > 0; } catch (RuntimeException e) { - StatusManager.fail(e, "could determine previous task", false); + StatusHandler.fail(e, "could determine previous task", false); return false; } } @@ -140,7 +140,7 @@ public class TaskActivationHistory { history.clear(); currentIndex = -1; } catch (RuntimeException e) { - StatusManager.fail(e, "could not clear history", false); + StatusHandler.fail(e, "could not clear history", false); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java index 509e83aff..aa6dc38c3 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java @@ -19,12 +19,12 @@ import org.eclipse.jface.viewers.IFontProvider; import org.eclipse.jface.viewers.ILabelDecorator; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITableLabelProvider; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer; import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskDelegate; import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; import org.eclipse.mylyn.monitor.core.DateUtil; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.AbstractTask.PriorityLevel; @@ -107,7 +107,7 @@ public class TaskActivityLabelProvider extends DecoratingLabelProvider implement if (elapsedTimeString.equals("")) elapsedTimeString = NO_MINUTES; } catch (RuntimeException e) { - StatusManager.fail(e, "Could not format elapsed time", true); + StatusHandler.fail(e, "Could not format elapsed time", true); } return elapsedTimeString; case 4: diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java index f6c420bfe..d63e034a2 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskInputDialog.java @@ -15,8 +15,8 @@ import java.util.Date; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.RetrieveTitleFromUrlJob; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.ui.DatePicker; import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.Clipboard; @@ -241,7 +241,7 @@ public class TaskInputDialog extends Dialog { job.schedule(); } catch (RuntimeException e) { - StatusManager.fail(e, "could not open task web page", false); + StatusHandler.fail(e, "could not open task web page", false); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java index c2a907656..b9e5b0646 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListCellModifier.java @@ -11,9 +11,9 @@ package org.eclipse.mylyn.internal.tasks.ui.views; import java.util.Arrays; import org.eclipse.jface.viewers.ICellModifier; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction; import org.eclipse.mylyn.internal.tasks.ui.actions.TaskDeactivateAction; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskCategory; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; @@ -50,7 +50,7 @@ class TaskListCellModifier implements ICellModifier { } } } catch (Exception e) { - StatusManager.log(e, e.getMessage()); + StatusHandler.log(e, e.getMessage()); } return ""; } @@ -89,7 +89,7 @@ class TaskListCellModifier implements ICellModifier { } } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } this.taskListView.getViewer().refresh(); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java index d1f28f0c4..baff013a9 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListDropAdapter.java @@ -26,13 +26,13 @@ import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerDropAdapter; import org.eclipse.mylyn.context.core.ContextCorePlugin; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer; import org.eclipse.mylyn.internal.tasks.core.TaskCategory; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; import org.eclipse.mylyn.internal.tasks.ui.RetrieveTitleFromUrlJob; import org.eclipse.mylyn.internal.tasks.ui.TaskTransfer; import org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateAction; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -208,7 +208,7 @@ public class TaskListDropAdapter extends ViewerDropAdapter { TasksUiUtil.refreshAndOpenTaskListElement(newTask); return true; } catch (CoreException e) { - StatusManager.fail(e, "could not create task", false); + StatusHandler.fail(e, "could not create task", false); return false; } } @@ -294,7 +294,7 @@ public class TaskListDropAdapter extends ViewerDropAdapter { }; job.schedule(); } catch (RuntimeException e) { - StatusManager.fail(e, "could not open task web page", false); + StatusHandler.fail(e, "could not open task web page", false); } } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java index f880416c4..9012075f3 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java @@ -51,7 +51,6 @@ import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.jface.viewers.TreeExpansionEvent; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.window.Window; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer; import org.eclipse.mylyn.internal.tasks.core.TaskArchive; import org.eclipse.mylyn.internal.tasks.core.TaskCategory; @@ -93,6 +92,7 @@ import org.eclipse.mylyn.internal.tasks.ui.actions.TaskListElementPropertiesActi import org.eclipse.mylyn.internal.tasks.ui.actions.TaskWorkingSetAction; import org.eclipse.mylyn.internal.tasks.ui.views.TaskListTableSorter.SortByIndex; import org.eclipse.mylyn.internal.tasks.ui.wizards.NewLocalTaskWizard; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskCategory; @@ -616,7 +616,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener { categoryGradientStart = new Color(Display.getDefault(), red, green, blue); } catch (Exception e) { categoryGradientStart = getViewer().getTree().getParent().getBackground(); - StatusManager.fail(e, "Could not set color: " + red + ", " + green + ", " + blue, false); + StatusHandler.fail(e, "Could not set color: " + red + ", " + green + ", " + blue, false); } red = Math.max(0, (int) (parentBackground.getRed() / GRADIENT_BOTTOM)); green = Math.max(0, (int) (parentBackground.getGreen() / GRADIENT_BOTTOM)); @@ -628,7 +628,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener { categoryGradientEnd = new Color(Display.getDefault(), red, green, blue); } catch (Exception e) { categoryGradientStart = getViewer().getTree().getParent().getBackground(); - StatusManager.fail(e, "Could not set color: " + red + ", " + green + ", " + blue, false); + StatusHandler.fail(e, "Could not set color: " + red + ", " + green + ", " + blue, false); } gradientListenerAdded = true; } else if (categoryGradientStart != null && categoryGradientStart.equals(categoryGradientEnd)) { @@ -652,7 +652,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener { try { return (TaskListView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(ID); } catch (Exception e) { - StatusManager.fail(e, "Could not show Task List view", false); + StatusHandler.fail(e, "Could not show Task List view", false); e.printStackTrace(); return null; } @@ -1646,7 +1646,7 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener { getViewer().refresh(element, true); } } catch (SWTException e) { - StatusManager.log(e, "Failed to refresh Task List"); + StatusHandler.log(e, "Failed to refresh Task List"); } } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java index 5b51e3094..8620d17bd 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java @@ -28,11 +28,11 @@ import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.Wizard; import org.eclipse.mylyn.context.core.ContextCorePlugin; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.LocalAttachment; import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -199,7 +199,7 @@ public class NewAttachmentWizard extends Wizard { handleSubmitError((CoreException) e1.getCause()); } else { - StatusManager.fail(e1, "Attachment failure", true); + StatusHandler.fail(e1, "Attachment failure", true); } return false; } catch (InterruptedException e1) { @@ -247,7 +247,7 @@ public class NewAttachmentWizard extends Wizard { // performFinish(); } } else { - StatusManager.displayStatus("Attachment failed", exception.getStatus()); + StatusHandler.displayStatus("Attachment failed", exception.getStatus()); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java index 7ba6ba3b4..2413d2a9e 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizard.java @@ -23,9 +23,9 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.mylyn.context.core.ContextCorePlugin; import org.eclipse.mylyn.internal.context.core.InteractionContextManager; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; import org.eclipse.mylyn.internal.tasks.ui.util.TaskDataExportJob; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.ui.IExportWizard; @@ -116,7 +116,7 @@ public class TaskDataExportWizard extends Wizard implements IExportWizard { final File destDirFile = new File(destDir); if (!destDirFile.exists() || !destDirFile.isDirectory()) { // This should never happen - StatusManager.fail(new Exception("File Export Exception"), + StatusHandler.fail(new Exception("File Export Exception"), "Could not export data because specified location does not exist or is not a folder", true); return false; } @@ -181,9 +181,9 @@ public class TaskDataExportWizard extends Wizard implements IExportWizard { try { service.run(true, false, job); } catch (InvocationTargetException e) { - StatusManager.fail(e, "Could not export files", true); + StatusHandler.fail(e, "Could not export files", true); } catch (InterruptedException e) { - StatusManager.fail(e, "Could not export files", true); + StatusHandler.fail(e, "Could not export files", true); } exportPage.saveSettings(); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java index a625909fd..7fad7549c 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataExportWizardPage.java @@ -12,7 +12,7 @@ package org.eclipse.mylyn.internal.tasks.ui.wizards; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; @@ -108,7 +108,7 @@ public class TaskDataExportWizardPage extends WizardPage { setPageComplete(validate()); } catch (RuntimeException e) { - StatusManager.fail(e, "Could not create export wizard page", true); + StatusHandler.fail(e, "Could not create export wizard page", true); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java index 3bbb67bc8..cc261d922 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard.java @@ -27,9 +27,9 @@ import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.mylyn.internal.context.core.InteractionContextManager; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.monitor.core.util.ZipFileUtil; import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.TaskList; @@ -162,7 +162,7 @@ public class TaskDataImportWizard extends Wizard implements IImportWizard { } } catch (IOException e) { - StatusManager.fail(e, "Could not import files", true); + StatusHandler.fail(e, "Could not import files", true); } FileCopyJob job = new FileCopyJob(sourceDirFile, sourceZipFile, sourceTaskListFile, sourceRepositoriesFile, @@ -173,9 +173,9 @@ public class TaskDataImportWizard extends Wizard implements IImportWizard { try { service.run(true, false, job); } catch (InvocationTargetException e) { - StatusManager.fail(e, "Could not import files", true); + StatusHandler.fail(e, "Could not import files", true); } catch (InterruptedException e) { - StatusManager.fail(e, "Could not import files", true); + StatusHandler.fail(e, "Could not import files", true); } importPage.saveSettings(); @@ -208,7 +208,7 @@ public class TaskDataImportWizard extends Wizard implements IImportWizard { //ZipFileUtil.unzipFiles(sourceZipFile, TasksUiPlugin.getDefault().getDataDirectory()); } catch (IOException ioe) { - StatusManager.fail(new Exception("Import Exception"), "Problem occured extracting from zip file.", + StatusHandler.fail(new Exception("Import Exception"), "Problem occured extracting from zip file.", true); return; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java index c66aec1b2..31c1c078e 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java @@ -19,8 +19,8 @@ import java.util.Comparator; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; @@ -119,7 +119,7 @@ public class TaskDataImportWizardPage extends WizardPage { setControl(container); setPageComplete(validate()); } catch (RuntimeException e) { - StatusManager.fail(e, "Could not create import wizard page", true); + StatusHandler.fail(e, "Could not create import wizard page", true); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java index 047f12a4f..36bbc5abe 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetElementFactory.java @@ -11,7 +11,7 @@ package org.eclipse.mylyn.internal.tasks.ui.workingsets; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.TaskList; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -49,7 +49,7 @@ public class TaskWorkingSetElementFactory implements IElementFactory { return project; } } catch (Throwable t) { - StatusManager.log("Could not not determine project for handle: " + projectHandle, t); + StatusHandler.log("Could not not determine project for handle: " + projectHandle, t); } } return null; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java index eea5726fa..d0c2e35f6 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java @@ -18,10 +18,10 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.IWizard; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.ui.OpenRepositoryTaskJob; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; import org.eclipse.mylyn.internal.tasks.ui.wizards.CommonAddExistingTaskWizard; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -156,7 +156,7 @@ public abstract class AbstractRepositoryConnectorUi { } } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java index 389921c53..cf5903ca7 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java @@ -37,7 +37,6 @@ import org.eclipse.mylyn.context.core.IInteractionContext; import org.eclipse.mylyn.context.core.IInteractionContextListener; import org.eclipse.mylyn.context.core.IInteractionElement; import org.eclipse.mylyn.internal.context.core.InteractionContextManager; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector; import org.eclipse.mylyn.internal.tasks.core.LocalTask; import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil; @@ -53,6 +52,7 @@ import org.eclipse.mylyn.internal.tasks.ui.util.TaskListWriter; import org.eclipse.mylyn.internal.tasks.ui.views.TaskActivationHistory; import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; import org.eclipse.mylyn.monitor.core.InteractionEvent; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.ITaskActivityListener; @@ -417,7 +417,7 @@ public class TaskListManager implements IPropertyChangeListener { } } } catch (Throwable t) { - StatusManager.fail(t, "Error parsing interaction event", false); + StatusHandler.fail(t, "Error parsing interaction event", false); } } @@ -720,7 +720,7 @@ public class TaskListManager implements IPropertyChangeListener { } } } catch (Exception e) { - StatusManager.fail(e, "Could not move context file: " + file.getName(), false); + StatusHandler.fail(e, "Could not move context file: " + file.getName(), false); } } } @@ -781,7 +781,7 @@ public class TaskListManager implements IPropertyChangeListener { listener.taskListRead(); } } catch (Throwable t) { - StatusManager.fail(t, "Could not read task list, consider restoring via view menu", true); + StatusHandler.fail(t, "Could not read task list, consider restoring via view menu", true); return false; } return true; @@ -805,10 +805,10 @@ public class TaskListManager implements IPropertyChangeListener { // TasksUiPlugin.getDefault().getPreferenceStore().setValue(TaskListPreferenceConstants.TASK_ID, // nextLocalTaskId); } else { - StatusManager.log("task list save attempted before initialization", this); + StatusHandler.log("task list save attempted before initialization", this); } } catch (Exception e) { - StatusManager.fail(e, "Could not save task list", true); + StatusHandler.fail(e, "Could not save task list", true); } } @@ -832,11 +832,11 @@ public class TaskListManager implements IPropertyChangeListener { try { listener.taskActivated(task); } catch (Throwable t) { - StatusManager.fail(t, "task activity listener failed: " + listener, false); + StatusHandler.fail(t, "task activity listener failed: " + listener, false); } } } catch (Throwable t) { - StatusManager.fail(t, "could not activate task", false); + StatusHandler.fail(t, "could not activate task", false); } } @@ -858,7 +858,7 @@ public class TaskListManager implements IPropertyChangeListener { try { listener.taskDeactivated(task); } catch (Throwable t) { - StatusManager.fail(t, "notification failed for: " + listener, false); + StatusHandler.fail(t, "notification failed for: " + listener, false); } } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java index 9bbe7b115..51ac10aa0 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java @@ -37,7 +37,6 @@ import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.mylyn.context.core.ContextCorePlugin; import org.eclipse.mylyn.internal.context.core.ContextPreferenceContstants; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector; import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer; import org.eclipse.mylyn.internal.tasks.core.TaskDataManager; @@ -64,6 +63,7 @@ import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiExtensionReader; import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView; import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -318,7 +318,7 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { super.start(context); // NOTE: startup order is very sensitive try { - StatusManager.addStatusHandler(new RepositoryAwareStatusHandler()); + StatusHandler.addStatusHandler(new RepositoryAwareStatusHandler()); WebClientUtil.initCommonsLoggingSettings(); initializeDefaultPreferences(getPreferenceStore()); taskListWriter = new TaskListWriter(); @@ -385,7 +385,7 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { } taskListManager.initActivityHistory(); } catch (Throwable t) { - StatusManager.fail(t, "Could not initialize task activity", false); + StatusHandler.fail(t, "Could not initialize task activity", false); } try { @@ -395,7 +395,7 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { taskListNotificationManager.startNotification(NOTIFICATION_DELAY); getPreferenceStore().addPropertyChangeListener(taskListNotificationManager); } catch (Throwable t) { - StatusManager.fail(t, "Could not initialize notifications", false); + StatusHandler.fail(t, "Could not initialize notifications", false); } try { @@ -405,7 +405,7 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { synchronizationScheduler = new TaskListSynchronizationScheduler(true); synchronizationScheduler.startSynchJob(); } catch (Throwable t) { - StatusManager.fail(t, "Could not initialize task list backup and synchronization", false); + StatusHandler.fail(t, "Could not initialize task list backup and synchronization", false); } try { @@ -427,13 +427,13 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { } checkForCredentials(); } catch (Throwable t) { - StatusManager.fail(t, "Could not finish Tasks UI initialization", false); + StatusHandler.fail(t, "Could not finish Tasks UI initialization", false); } } }); } catch (Exception e) { e.printStackTrace(); - StatusManager.fail(e, "Mylar Task List initialization failed", false); + StatusHandler.fail(e, "Mylar Task List initialization failed", false); } } @@ -465,7 +465,7 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { taskRepositoryManager.addRepository(taskRepository, getRepositoriesFilePath()); } } catch (Throwable t) { - StatusManager.fail(t, "Could not load repository template", false); + StatusHandler.fail(t, "Could not load repository template", false); } } } @@ -492,7 +492,7 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { } } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } } } @@ -526,7 +526,7 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { INSTANCE = null; } } catch (Exception e) { - StatusManager.log(e, "Mylar Task List stop terminated abnormally"); + StatusHandler.log(e, "Mylar Task List stop terminated abnormally"); } finally { super.stop(context); } @@ -699,7 +699,7 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup { public static TaskDataManager getTaskDataManager() { if (INSTANCE == null || INSTANCE.taskDataManager == null) { - StatusManager.fail(null, "Offline reports file not created, try restarting.", true); + StatusHandler.fail(null, "Offline reports file not created, try restarting.", true); return null; } else { return INSTANCE.taskDataManager; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java index df5e3a202..9e66f1093 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java @@ -37,7 +37,6 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.window.Window; import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.LocalTask; import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskDelegate; import org.eclipse.mylyn.internal.tasks.core.TaskCategory; @@ -46,6 +45,7 @@ import org.eclipse.mylyn.internal.tasks.ui.editors.CategoryEditor; import org.eclipse.mylyn.internal.tasks.ui.editors.CategoryEditorInput; import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView; import org.eclipse.mylyn.internal.tasks.ui.wizards.EditRepositoryWizard; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -120,7 +120,7 @@ public class TasksUiUtil { IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport(); support.getExternalBrowser().openURL(new URL(url)); } catch (Exception e) { - StatusManager.fail(e, "could not open task url", true); + StatusHandler.fail(e, "could not open task url", true); } } else { IWebBrowser browser = null; @@ -154,7 +154,7 @@ public class TasksUiUtil { try { opened = connectorUi.openRepositoryTask(repository.getUrl(), taskId); } catch (Exception e) { - StatusManager.log(e, "Internal error while opening repository task"); + StatusHandler.log(e, "Internal error while opening repository task"); } } } @@ -223,7 +223,7 @@ public class TasksUiUtil { repositoryTask.getRepositoryUrl()); if (repository == null) { - StatusManager.fail(null, "No repository found for task. Please create repository in " + StatusHandler.fail(null, "No repository found for task. Please create repository in " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".", true); return; } @@ -367,7 +367,7 @@ public class TasksUiUtil { TasksUiPlugin.getSynchronizationManager().setTaskRead((AbstractTask) task, true); } } else { - StatusManager.log("Unable to open editor for " + task.getSummary(), TasksUiUtil.class); + StatusHandler.log("Unable to open editor for " + task.getSummary(), TasksUiUtil.class); } } } @@ -395,7 +395,7 @@ public class TasksUiUtil { try { return page.openEditor(input, editorId); } catch (PartInitException e) { - StatusManager.fail(e, "Open for editor failed: " + input + ", taskId: " + editorId, true); + StatusHandler.fail(e, "Open for editor failed: " + input + ", taskId: " + editorId, true); } return null; } @@ -432,7 +432,7 @@ public class TasksUiUtil { TaskRepositoriesView.getFromActivePerspective().getViewer().refresh(); } } catch (Exception e) { - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); } return Dialog.OK; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java index 5e7daecda..ee2b103d5 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java @@ -62,7 +62,6 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.CommentQuoter; import org.eclipse.mylyn.internal.tasks.ui.PersonProposalLabelProvider; import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider; @@ -85,6 +84,7 @@ import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskOutlinePage; import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskSelection; import org.eclipse.mylyn.internal.tasks.ui.editors.TaskFormPage; import org.eclipse.mylyn.monitor.core.DateUtil; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.AbstractTaskCategory; @@ -1302,7 +1302,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { try { page.openEditor(input, desc.getId()); } catch (PartInitException e) { - StatusManager.fail(e, "Unable to open editor for: " + attachment.getDescription(), false); + StatusHandler.fail(e, "Unable to open editor for: " + attachment.getDescription(), false); } } }; @@ -1319,7 +1319,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { try { page.openEditor(input, "org.eclipse.ui.DefaultTextEditor"); } catch (PartInitException e) { - StatusManager.fail(e, "Unable to open editor for: " + attachment.getDescription(), false); + StatusHandler.fail(e, "Unable to open editor for: " + attachment.getDescription(), false); } } }; @@ -2773,7 +2773,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { if (modifiedTask != null) { modifiedTask.setSubmitting(false); } - StatusManager.fail(e, e.getMessage(), true); + StatusHandler.fail(e, e.getMessage(), true); PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { setGlobalBusy(false);// enableButtons(); @@ -2897,9 +2897,9 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { if (form != null && !form.isDisposed()) { if (exception.getStatus().getCode() == RepositoryStatus.ERROR_IO) { parentEditor.setMessage(ERROR_NOCONNECTIVITY, IMessageProvider.ERROR); - StatusManager.log(exception.getStatus()); + StatusHandler.log(exception.getStatus()); } else if (exception.getStatus().getCode() == RepositoryStatus.REPOSITORY_COMMENT_REQUIRED) { - StatusManager.displayStatus("Comment required", exception.getStatus()); + StatusHandler.displayStatus("Comment required", exception.getStatus()); if (!isDisposed && newCommentTextViewer != null && !newCommentTextViewer.getControl().isDisposed()) { newCommentTextViewer.getControl().setFocus(); @@ -2910,7 +2910,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { return; } } else { - StatusManager.displayStatus("Submit failed", exception.getStatus()); + StatusHandler.displayStatus("Submit failed", exception.getStatus()); } setGlobalBusy(false); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java index 70dc146ce..b60c05858 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java @@ -23,13 +23,13 @@ import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.LocalTask; import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; import org.eclipse.mylyn.internal.tasks.ui.editors.EditorBusyIndicator; import org.eclipse.mylyn.internal.tasks.ui.editors.IBusyEditor; import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor; import org.eclipse.mylyn.internal.tasks.ui.editors.TaskPlanningEditor; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.RepositoryTaskData; import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi; @@ -301,7 +301,7 @@ public final class TaskEditor extends SharedHeaderFormEditor implements IBusyEdi contentOutlineProvider = editor; } } catch (Exception e) { - StatusManager.fail(e, "Could not create editor via factory: " + factory, true); + StatusHandler.fail(e, "Could not create editor via factory: " + factory, true); } } } @@ -328,7 +328,7 @@ public final class TaskEditor extends SharedHeaderFormEditor implements IBusyEdi } } catch (PartInitException e) { - StatusManager.fail(e, "failed to create task editor pages", false); + StatusHandler.fail(e, "failed to create task editor pages", false); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/SearchHitCollector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/SearchHitCollector.java index 60b557b4e..d68969373 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/SearchHitCollector.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/SearchHitCollector.java @@ -20,7 +20,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -163,7 +163,7 @@ public class SearchHitCollector implements ISearchQuery, ITaskCollector { public ISearchResult getSearchResult() { if (searchResult.getMatchCount() >= QueryHitCollector.MAX_HITS) { - StatusManager.displayStatus("Maximum hits reached", RepositoryStatus.createStatus(repository.getUrl(), + StatusHandler.displayStatus("Maximum hits reached", RepositoryStatus.createStatus(repository.getUrl(), IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, LABEL_MAX_HITS_REACHED)); } return searchResult; @@ -185,7 +185,7 @@ public class SearchHitCollector implements ISearchQuery, ITaskCollector { if (connector != null) { IStatus status = connector.performQuery(repositoryQuery, repository, monitor, this); if (!status.isOK()) { - StatusManager.displayStatus("Search failed", status); + StatusHandler.displayStatus("Search failed", status); } } else { return new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, IStatus.OK, diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java index 80ba45075..45d6cb151 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java @@ -25,8 +25,8 @@ import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.preference.StringFieldEditor; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; @@ -435,7 +435,7 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage { } } } catch (Throwable t) { - StatusManager.fail(t, "could not set field value for: " + repository, false); + StatusHandler.fail(t, "could not set field value for: " + repository, false); } } } @@ -548,7 +548,7 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage { repositoryUserNameEditor.setStringValue(repository.getUserName()); repositoryPasswordEditor.setStringValue(repository.getPassword()); } catch (Throwable t) { - StatusManager.fail(t, "could not set field value for: " + repository, false); + StatusHandler.fail(t, "could not set field value for: " + repository, false); } } else { oldUsername = ""; @@ -1006,7 +1006,7 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage { try { super.refreshValidState(); } catch (Exception e) { - StatusManager.log(e, "problem refreshing password field"); + StatusHandler.log(e, "problem refreshing password field"); } } @@ -1239,7 +1239,7 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage { } }); } catch (InvocationTargetException e) { - StatusManager.fail(e.getCause(), "Internal error validating repository", true); + StatusHandler.fail(e.getCause(), "Internal error validating repository", true); return; } catch (InterruptedException e) { // canceled diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java index df95d8646..c8302d41d 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java @@ -16,7 +16,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractTask; @@ -66,7 +66,7 @@ public class NewTaskWizard extends Wizard implements INewWizard { final AbstractTaskDataHandler taskDataHandler = (AbstractTaskDataHandler) connector.getTaskDataHandler(); if (taskDataHandler == null) { - StatusManager.displayStatus("Error creating new task", new RepositoryStatus(IStatus.ERROR, + StatusHandler.displayStatus("Error creating new task", new RepositoryStatus(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, RepositoryStatus.ERROR_REPOSITORY, "The selected repository does not support creating new tasks.")); return false; } @@ -93,9 +93,9 @@ public class NewTaskWizard extends Wizard implements INewWizard { getContainer().run(true, true, runnable); } catch (InvocationTargetException e) { if (e.getCause() instanceof CoreException) { - StatusManager.displayStatus("Error creating new task", ((CoreException) e.getCause()).getStatus()); + StatusHandler.displayStatus("Error creating new task", ((CoreException) e.getCause()).getStatus()); } else { - StatusManager.fail(e.getCause(), "Error creating new task", true); + StatusHandler.fail(e.getCause(), "Error creating new task", true); } return false; } catch (InterruptedException e) { diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java index 6584b0d4b..957498f85 100644 --- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java +++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracWebClient.java @@ -40,7 +40,6 @@ import org.apache.commons.httpclient.cookie.CookiePolicy; import org.apache.commons.httpclient.methods.GetMethod; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.trac.core.model.TracComponent; import org.eclipse.mylyn.internal.trac.core.model.TracMilestone; import org.eclipse.mylyn.internal.trac.core.model.TracPriority; @@ -56,6 +55,7 @@ import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperat import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key; import org.eclipse.mylyn.internal.trac.core.util.TracUtils; import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory.TracHttpException; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.web.core.HtmlStreamTokenizer; import org.eclipse.mylyn.web.core.HtmlTag; import org.eclipse.mylyn.web.core.WebClientUtil; @@ -271,7 +271,7 @@ public class TracWebClient extends AbstractTracClient { ticket.putBuiltinValue(fields[i], parseTicketValue(t.nextToken())); } } catch (NumberFormatException e) { - StatusManager.log(e, "Error parsing response: " + line); + StatusHandler.log(e, "Error parsing response: " + line); } } } diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java index 2428ef71e..77c5f7990 100644 --- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java +++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracXmlRpcClient.java @@ -24,7 +24,6 @@ import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.trac.core.model.TracAttachment; import org.eclipse.mylyn.internal.trac.core.model.TracComment; import org.eclipse.mylyn.internal.trac.core.model.TracComponent; @@ -42,6 +41,7 @@ import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key; import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory; import org.eclipse.mylyn.internal.trac.core.util.TracUtils; import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory.TracHttpException; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.web.core.WebClientUtil; /** @@ -520,10 +520,10 @@ public class TracXmlRpcClient extends AbstractTracClient { attribute.value = (value instanceof Integer) ? (Integer) value : Integer.parseInt((String) value); attributes.add(attribute); } catch (ClassCastException e) { - StatusManager.log(e, "Invalid response from Trac repository for attribute type: '" + attributeType + StatusHandler.log(e, "Invalid response from Trac repository for attribute type: '" + attributeType + "'"); } catch (NumberFormatException e) { - StatusManager.log(e, "Invalid response from Trac repository for attribute type: '" + attributeType + StatusHandler.log(e, "Invalid response from Trac repository for attribute type: '" + attributeType + "'"); } } @@ -567,7 +567,7 @@ public class TracXmlRpcClient extends AbstractTracClient { try { in.close(); } catch (IOException e) { - StatusManager.fail(e, "Error closing attachment stream", false); + StatusHandler.fail(e, "Error closing attachment stream", false); } } } diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java index 0172f90f8..87971c9df 100644 --- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java +++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/model/TracSearch.java @@ -21,9 +21,9 @@ import java.util.List; import java.util.Map; import java.util.StringTokenizer; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.trac.core.ITracClient; import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator; +import org.eclipse.mylyn.monitor.core.StatusHandler; /** * Represents a Trac search. A search can have multiple {@link TracSearchFilter}s @@ -146,7 +146,7 @@ public class TracSearch { sb.append(URLEncoder.encode(filter.getOperator().getQueryValue(), ITracClient.CHARSET)); sb.append(URLEncoder.encode(value, ITracClient.CHARSET)); } catch (UnsupportedEncodingException e) { - StatusManager.log(e, "Unexpected exception while decoding URL"); + StatusHandler.log(e, "Unexpected exception while decoding URL"); } } } @@ -173,7 +173,7 @@ public class TracSearch { addFilter(key, value); } } catch (UnsupportedEncodingException e) { - StatusManager.log(e, "Unexpected exception while decoding URL"); + StatusHandler.log(e, "Unexpected exception while decoding URL"); } } } diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java index 56623296c..98e383aca 100644 --- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java +++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java @@ -18,8 +18,8 @@ import java.util.regex.Pattern; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.Region; import org.eclipse.jface.text.hyperlink.IHyperlink; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.trac.core.ITracClient; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.TaskHyperlink; import org.eclipse.mylyn.tasks.ui.WebHyperlink; @@ -204,7 +204,7 @@ public class TracHyperlinkUtil { url += "?new_path=" + URLEncoder.encode(new_path, "UTF-8"); url += "&old_path=" + URLEncoder.encode(old_path, "UTF-8"); } catch (UnsupportedEncodingException e) { - StatusManager.fail(e, "Unexpected exception", false); + StatusHandler.fail(e, "Unexpected exception", false); continue; } if (new_rev != null) { diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java index cc31971c2..9c0978006 100644 --- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java +++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracUiPlugin.java @@ -13,8 +13,8 @@ package org.eclipse.mylyn.internal.trac.ui; import org.eclipse.core.runtime.IStatus; import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.trac.core.TracCorePlugin; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; @@ -62,7 +62,7 @@ public class TracUiPlugin extends AbstractUIPlugin { public static void handleTracException(IStatus status) { if (status.getCode() == IStatus.ERROR) { - StatusManager.log(status); + StatusHandler.log(status); ErrorDialog.openError(null, TITLE_MESSAGE_DIALOG, null, status); } else if (status.getCode() == IStatus.INFO) { ErrorDialog.openError(null, TITLE_MESSAGE_DIALOG, null, status); diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/BrowserFormPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/BrowserFormPage.java index 61415c9e1..d0f4170d5 100644 --- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/BrowserFormPage.java +++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/editor/BrowserFormPage.java @@ -8,7 +8,7 @@ package org.eclipse.mylyn.internal.trac.ui.editor; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput; import org.eclipse.swt.SWT; @@ -45,9 +45,9 @@ public class BrowserFormPage extends FormPage { managedForm.getForm().setContent(browser); browser.setUrl(task.getUrl()); } catch (SWTError e) { - StatusManager.fail(e, "Could not create Browser page: " + e.getMessage(), true); + StatusHandler.fail(e, "Could not create Browser page: " + e.getMessage(), true); } catch (RuntimeException e) { - StatusManager.fail(e, "could not create issue report page", false); + StatusHandler.fail(e, "could not create issue report page", false); } } diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java index b8659f791..8dbc03d11 100644 --- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java +++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracCustomQueryPage.java @@ -19,7 +19,6 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.trac.core.ITracClient; import org.eclipse.mylyn.internal.trac.core.TracCorePlugin; import org.eclipse.mylyn.internal.trac.core.TracException; @@ -29,6 +28,7 @@ import org.eclipse.mylyn.internal.trac.core.model.TracSearch; import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter; import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator; import org.eclipse.mylyn.internal.trac.ui.TracUiPlugin; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.TaskRepositoryManager; @@ -178,7 +178,7 @@ public class TracCustomQueryPage extends AbstractRepositoryQueryPage { if (field != null) { field.setFilter(filter); } else { - StatusManager.log("Ignoring invalid search filter: " + filter, this); + StatusHandler.log("Ignoring invalid search filter: " + filter, this); } } } diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java index 77c10c964..1cdf91df5 100644 --- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java +++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/TracQueryWizardPage.java @@ -17,12 +17,12 @@ import java.util.List; import java.util.Set; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; import org.eclipse.mylyn.internal.trac.core.ITracClient; import org.eclipse.mylyn.internal.trac.core.TracRepositoryQuery; import org.eclipse.mylyn.internal.trac.core.model.TracSearch; import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter; import org.eclipse.mylyn.internal.trac.core.model.TracSearchFilter.CompareOperator; +import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryQuery; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.swt.SWT; @@ -113,7 +113,7 @@ public class TracQueryWizardPage extends WizardPage { if (field != null) { showSearchField(field, filter); } else { - StatusManager.log("Ignoring invalid search filter: " + filter, this); + StatusHandler.log("Ignoring invalid search filter: " + filter, this); } } } |