summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-09 22:01:38 (EST)
committer Steffen Pingel2012-02-09 22:01:38 (EST)
commita7f0e7fc780376a7ec5b21dd4a8a15d2ca015090 (patch)
tree24573a3dddf646e1455ca0fe2e57bf9e752935ea
parent9f99269112887b9003a6938eb5b59c1eb44f969b (diff)
downloadorg.eclipse.mylyn.tasks-a7f0e7fc780376a7ec5b21dd4a8a15d2ca015090.zip
org.eclipse.mylyn.tasks-a7f0e7fc780376a7ec5b21dd4a8a15d2ca015090.tar.gz
org.eclipse.mylyn.tasks-a7f0e7fc780376a7ec5b21dd4a8a15d2ca015090.tar.bz2
RESOLVED - bug 370504: fix opening bugs with browser
https://bugs.eclipse.org/bugs/show_bug.cgi?id=370504 Change-Id: Iddeda8c76e477247dc78830253a4615afba9e53e
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java9
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java4
2 files changed, 8 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java
index 27fb3dc..0287896 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java
@@ -17,6 +17,7 @@ import java.util.Date;
import junit.framework.TestCase;
import org.eclipse.mylyn.commons.ui.PlatformUiUtil;
+import org.eclipse.mylyn.commons.workbench.browser.BrowserUtil;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
@@ -143,7 +144,7 @@ public class TasksUiUtilTest extends TestCase {
Field f = input.getClass().getDeclaredField("style");
f.setAccessible(true);
int style = (Integer) f.get(input);
- assertFalse((style & TasksUiUtil.FLAG_NO_RICH_EDITOR) == 0);
+ assertFalse((style & BrowserUtil.NO_RICH_EDITOR) == 0);
TasksUiUtil.openUrl("http://eclipse.org/mylyn");
assertEquals(2, activePage.getEditorReferences().length);
@@ -155,7 +156,7 @@ public class TasksUiUtilTest extends TestCase {
f = input.getClass().getDeclaredField("style");
f.setAccessible(true);
style = (Integer) f.get(input);
- assertFalse((style & TasksUiUtil.FLAG_NO_RICH_EDITOR) == 0);
+ assertFalse((style & BrowserUtil.NO_RICH_EDITOR) == 0);
IEditorPart editor2 = activePage.getEditorReferences()[1].getEditor(true);
assertEquals(WebBrowserEditor.class, editor2.getClass());
@@ -166,7 +167,7 @@ public class TasksUiUtilTest extends TestCase {
f = input.getClass().getDeclaredField("style");
f.setAccessible(true);
style = (Integer) f.get(input);
- assertFalse((style & TasksUiUtil.FLAG_NO_RICH_EDITOR) == 0);
+ assertFalse((style & BrowserUtil.NO_RICH_EDITOR) == 0);
// open task should not set FLAG_NO_RICH_EDITOR
TasksUiUtil.openTask("http://eclipse.org/mylyn/test");
@@ -180,7 +181,7 @@ public class TasksUiUtilTest extends TestCase {
f = input.getClass().getDeclaredField("style");
f.setAccessible(true);
style = (Integer) f.get(input);
- assertTrue((style & TasksUiUtil.FLAG_NO_RICH_EDITOR) == 0);
+ assertTrue((style & BrowserUtil.NO_RICH_EDITOR) == 0);
}
} \ No newline at end of file
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 fd30b8f..dab8d94 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
@@ -71,7 +71,9 @@ public class TasksUiUtil {
* editor was available.
*
* @see #openTask(String)
+ * @deprecated use {@link BrowserUtil#NO_RICH_EDITOR} instead
*/
+ @Deprecated
public static final int FLAG_NO_RICH_EDITOR = 1 << 17;
/**
@@ -393,7 +395,7 @@ public class TasksUiUtil {
* @since 3.0
*/
public static void openUrl(String location) {
- BrowserUtil.openUrl(location, FLAG_NO_RICH_EDITOR);
+ BrowserUtil.openUrl(location, BrowserUtil.NO_RICH_EDITOR);
}
/**