Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java
index f4c41425fa..21731b3684 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java
@@ -2,6 +2,7 @@
* Copyright (C) 2007,2010 Robin Rosenberg <robin.rosenberg@dewire.com>
* Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
* Copyright (C) 2010, Mathias Kinzler <mathias.kinzler@sap.com>
+ * Copyright (C) 2012, Matthias Sohn <matthias.sohn@sap.com>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -107,7 +108,23 @@ public class Activator extends AbstractUIPlugin implements DebugOptionsListener
*/
public static void handleError(String message, Throwable throwable,
boolean show) {
- IStatus status = new Status(IStatus.ERROR, getPluginId(), message,
+ handleIssue(IStatus.ERROR, message, throwable, show);
+ }
+
+ /**
+ * Handle an issue. The issue is logged. If <code>show</code> is
+ * <code>true</code> the issue is shown to the user.
+ *
+ * @param severity
+ * status severity, use constants defined in {@link IStatus}
+ * @param message
+ * a localized message
+ * @param throwable
+ * @param show
+ */
+ public static void handleIssue(int severity, String message, Throwable throwable,
+ boolean show) {
+ IStatus status = new Status(severity, getPluginId(), message,
throwable);
int style = StatusManager.LOG;
if (show)

Back to the top