summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-12-10 20:54:40 (EST)
committerSteffen Pingel2011-12-10 20:54:40 (EST)
commit491e5d3a155d6e9c2c7250cf796b353ec61ff3d2 (patch)
tree632de52c63a5ea8082167cd752f46a17b3d3790c
parent2ef044b7f1a1590d122c23ba459575334a94caa7 (diff)
downloadorg.eclipse.mylyn.commons-491e5d3a155d6e9c2c7250cf796b353ec61ff3d2.zip
org.eclipse.mylyn.commons-491e5d3a155d6e9c2c7250cf796b353ec61ff3d2.tar.gz
org.eclipse.mylyn.commons-491e5d3a155d6e9c2c7250cf796b353ec61ff3d2.tar.bz2
NEW - bug 364632: remove invocations to StatusHandler.fail()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=364632 Change-Id: I5154bcb3d11505f24433eabf8562bb605a61398a
-rw-r--r--org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/StatusHandler.java2
-rw-r--r--org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/manual/StatusHandlerTest.java59
2 files changed, 2 insertions, 59 deletions
diff --git a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/StatusHandler.java b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/StatusHandler.java
index 0cd37d4..2e7469b 100644
--- a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/StatusHandler.java
+++ b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/StatusHandler.java
@@ -61,7 +61,9 @@ public class StatusHandler {
*
* @see #log(IStatus)
* @since 3.0
+ * @deprecated
*/
+ @Deprecated
public static void fail(IStatus status) {
log(status);
getErrorReporterManager().fail(status);
diff --git a/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/manual/StatusHandlerTest.java b/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/manual/StatusHandlerTest.java
deleted file mode 100644
index 2b38add..0000000
--- a/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/manual/StatusHandlerTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 Tasktop Technologies and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.commons.tests.manual;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Mik Kersten
- */
-public class StatusHandlerTest extends TestCase {
-
- public void testErrorDialog() {
- try {
- int i = 10 / 0;
- System.out.println(i);
- } catch (Throwable t) {
- StatusHandler.fail(new Status(IStatus.ERROR, "org.eclipse.mylyn", "whoops", t));
- }
- StatusHandler.fail(new Status(IStatus.ERROR, "org.eclipse.mylyn", "whoops"));
-
- assertTrue(confirmWithUser("Did an error dialog show up correctly?"));
- }
-
- public boolean confirmWithUser(String message) {
- final boolean[] questionResponse = new boolean[1];
- final String finalMsg = message;
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- try {
- IWorkbenchWindow iww = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- Shell shell = iww.getShell();
- questionResponse[0] = MessageDialog.openQuestion(shell, "JUnit Verification", finalMsg);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
- });
- return questionResponse[0];
- }
-
-}