Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-12-10 20:55:12 -0500
committerSteffen Pingel2011-12-10 20:55:12 -0500
commitb369e6ef6cfdbebbb3e81da5624510152cc99779 (patch)
tree90cfb5c7c0b7294e2017637cfa7441279464c1e2
parent748208c65b4015b1d3f309a5cd02bf0090cacd82 (diff)
downloadorg.eclipse.mylyn.incubator-b369e6ef6cfdbebbb3e81da5624510152cc99779.tar.gz
org.eclipse.mylyn.incubator-b369e6ef6cfdbebbb3e81da5624510152cc99779.tar.xz
org.eclipse.mylyn.incubator-b369e6ef6cfdbebbb3e81da5624510152cc99779.zip
NEW - bug 364632: remove invocations to StatusHandler.fail()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=364632
-rw-r--r--org.eclipse.mylyn.monitor.reports/src/org/eclipse/mylyn/internal/monitor/reports/collectors/FocusedUiUsageAnalysisCollector.java2
-rw-r--r--org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MonitorFileRolloverJob.java6
-rw-r--r--org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/editors/UsageSummaryReportEditorPart.java6
-rw-r--r--org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/preferences/UsageDataPreferencePage.java7
-rw-r--r--org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java23
-rw-r--r--org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java4
-rw-r--r--org.eclipse.mylyn.trac.wiki/src/org/eclipse/mylyn/internal/trac/wiki/editor/TracWikiPageEditor.java2
7 files changed, 21 insertions, 29 deletions
diff --git a/org.eclipse.mylyn.monitor.reports/src/org/eclipse/mylyn/internal/monitor/reports/collectors/FocusedUiUsageAnalysisCollector.java b/org.eclipse.mylyn.monitor.reports/src/org/eclipse/mylyn/internal/monitor/reports/collectors/FocusedUiUsageAnalysisCollector.java
index eaabc250..d1e01eb9 100644
--- a/org.eclipse.mylyn.monitor.reports/src/org/eclipse/mylyn/internal/monitor/reports/collectors/FocusedUiUsageAnalysisCollector.java
+++ b/org.eclipse.mylyn.monitor.reports/src/org/eclipse/mylyn/internal/monitor/reports/collectors/FocusedUiUsageAnalysisCollector.java
@@ -385,7 +385,7 @@ public class FocusedUiUsageAnalysisCollector extends AbstractMylynUsageCollector
}
writer.close();
} catch (IOException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, MonitorReportsPlugin.ID_PLUGIN, "Could not generate csv file",
+ StatusHandler.log(new Status(IStatus.ERROR, MonitorReportsPlugin.ID_PLUGIN, "Could not generate csv file",
e));
}
}
diff --git a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MonitorFileRolloverJob.java b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MonitorFileRolloverJob.java
index 27f7cfe4..56295569 100644
--- a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MonitorFileRolloverJob.java
+++ b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/MonitorFileRolloverJob.java
@@ -195,7 +195,7 @@ public class MonitorFileRolloverJob extends Job implements IJobChangeListener {
zipFileStream.closeEntry();
zipFileStream.close();
} catch (IOException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
+ StatusHandler.log(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
studyParameters.getStudyName() + "Mylyn monitor log rollover failed", e)); //$NON-NLS-1$
}
@@ -231,7 +231,7 @@ public class MonitorFileRolloverJob extends Job implements IJobChangeListener {
}
} catch (PartInitException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
+ StatusHandler.log(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
"Could not show usage summary", e)); //$NON-NLS-1$
}
@@ -269,7 +269,7 @@ public class MonitorFileRolloverJob extends Job implements IJobChangeListener {
}
} catch (PartInitException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
+ StatusHandler.log(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
"Could not show usage summary", e)); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/editors/UsageSummaryReportEditorPart.java b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/editors/UsageSummaryReportEditorPart.java
index 03309f48..c8fc5a90 100644
--- a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/editors/UsageSummaryReportEditorPart.java
+++ b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/editors/UsageSummaryReportEditorPart.java
@@ -27,7 +27,6 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.monitor.usage.InteractionEventSummarySorter;
import org.eclipse.mylyn.internal.monitor.usage.UiUsageMonitorPlugin;
import org.eclipse.mylyn.internal.monitor.usage.common.UsageCountContentProvider;
@@ -57,6 +56,7 @@ import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.internal.browser.WebBrowserPreference;
import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport;
+import org.eclipse.ui.statushandlers.StatusManager;
/**
* @author Meghan Allen
@@ -176,8 +176,8 @@ public class UsageSummaryReportEditorPart extends UsageEditorPart {
IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
support.getExternalBrowser().openURL(new URL(studyParameters.getUsagePageUrl()));
} catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
- "Could not open url", e)); //$NON-NLS-1$
+ StatusManager.getManager()
+ .handle(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN, "Could not open url", e), StatusManager.SHOW | StatusManager.LOG); //$NON-NLS-1$
}
} else {
IWebBrowser browser = null;
diff --git a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/preferences/UsageDataPreferencePage.java b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/preferences/UsageDataPreferencePage.java
index f688c87a..ddf3f10c 100644
--- a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/preferences/UsageDataPreferencePage.java
+++ b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/preferences/UsageDataPreferencePage.java
@@ -23,7 +23,6 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.ui.compatibility.CommonColors;
import org.eclipse.mylyn.internal.monitor.usage.InteractionEventObfuscator;
import org.eclipse.mylyn.internal.monitor.usage.MonitorPreferenceConstants;
@@ -55,6 +54,7 @@ import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.ImageHyperlink;
import org.eclipse.ui.internal.browser.WebBrowserPreference;
import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport;
+import org.eclipse.ui.statushandlers.StatusManager;
/**
* @author Mik Kersten
@@ -129,8 +129,9 @@ public class UsageDataPreferencePage extends PreferencePage implements IWorkbenc
IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
support.getExternalBrowser().openURL(new URL(moreInformationUrl));
} catch (Exception e) {
- StatusHandler.fail(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
- "Could not open url", e)); //$NON-NLS-1$
+ StatusManager.getManager()
+ .handle(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
+ "Failed to not open url", e), StatusManager.SHOW | StatusManager.LOG); //$NON-NLS-1$
}
} else {
IWebBrowser browser = null;
diff --git a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java
index 62f97d29..4b0fc92d 100644
--- a/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java
+++ b/org.eclipse.mylyn.monitor.usage/src/org/eclipse/mylyn/internal/monitor/usage/wizards/UsageFileSelectionWizardPage.java
@@ -20,11 +20,8 @@ import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.monitor.usage.MonitorFileRolloverJob;
import org.eclipse.mylyn.internal.monitor.usage.StudyParameters;
import org.eclipse.mylyn.internal.monitor.usage.UiUsageMonitorPlugin;
@@ -150,19 +147,13 @@ public class UsageFileSelectionWizardPage extends WizardPage {
}
public void createControl(Composite parent) {
- try {
- Composite container = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(3, false);
- layout.verticalSpacing = 15;
- container.setLayout(layout);
- addZippedFileView(container);
- setControl(container);
- // setPageComplete(validate());
- } catch (RuntimeException e) {
- // FIXME what exception is caught here?
- StatusHandler.fail(new Status(IStatus.ERROR, UiUsageMonitorPlugin.ID_PLUGIN,
- "Could not create import wizard page", e)); //$NON-NLS-1$
- }
+ Composite container = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(3, false);
+ layout.verticalSpacing = 15;
+ container.setLayout(layout);
+ addZippedFileView(container);
+ setControl(container);
+ // setPageComplete(validate());
}
public List<String> getZipFilesSelected() {
diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java
index 8c746c10..6e723762 100644
--- a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java
+++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java
@@ -352,7 +352,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL
hits.add(document.get(IndexField.IDENTIFIER.fieldName()));
}
} catch (IOException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksIndexCore.BUNDLE_ID,
+ StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.BUNDLE_ID,
"Unexpected failure within task list index", e)); //$NON-NLS-1$
} finally {
try {
@@ -422,7 +422,7 @@ public class TaskListIndex implements ITaskDataManagerListener, ITaskListChangeL
}
}
} catch (IOException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TasksIndexCore.BUNDLE_ID,
+ StatusHandler.log(new Status(IStatus.ERROR, TasksIndexCore.BUNDLE_ID,
"Unexpected failure within task list index", e)); //$NON-NLS-1$
} finally {
try {
diff --git a/org.eclipse.mylyn.trac.wiki/src/org/eclipse/mylyn/internal/trac/wiki/editor/TracWikiPageEditor.java b/org.eclipse.mylyn.trac.wiki/src/org/eclipse/mylyn/internal/trac/wiki/editor/TracWikiPageEditor.java
index ccd12c7f..f702ecff 100644
--- a/org.eclipse.mylyn.trac.wiki/src/org/eclipse/mylyn/internal/trac/wiki/editor/TracWikiPageEditor.java
+++ b/org.eclipse.mylyn.trac.wiki/src/org/eclipse/mylyn/internal/trac/wiki/editor/TracWikiPageEditor.java
@@ -508,7 +508,7 @@ public class TracWikiPageEditor extends FormEditor {
setPartName(getEditorInput().getName());
setActivePage(BrowserFormPage.ID_EDITOR);
} catch (PartInitException e) {
- StatusHandler.fail(new Status(IStatus.ERROR, TracWikiPlugin.ID_PLUGIN,
+ StatusHandler.log(new Status(IStatus.ERROR, TracWikiPlugin.ID_PLUGIN,
"Cannot create Trac Wiki page editor pages"));
}
}

Back to the top