Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-04 18:36:24 +0000
committerSteffen Pingel2012-02-04 18:37:37 +0000
commitddf3e859c612e9f33e23d6fa42e86c0a13056503 (patch)
tree5f1cf89caf2a1baead668ee5a90d3bb9d890b5b3 /org.eclipse.mylyn.tasks.tests/src
parent36af7097778ad8c52c7b213204b610315741aecb (diff)
downloadorg.eclipse.mylyn.tasks-ddf3e859c612e9f33e23d6fa42e86c0a13056503.tar.gz
org.eclipse.mylyn.tasks-ddf3e859c612e9f33e23d6fa42e86c0a13056503.tar.xz
org.eclipse.mylyn.tasks-ddf3e859c612e9f33e23d6fa42e86c0a13056503.zip
NEW - bug 370504: register URL handler for opening tasks in rich editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=370504 Change-Id: I1990e3f5d5f9cbae235cd5d8ed76a7a40bb3a0af
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests/src')
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java
index d043987f3..6fa275a02 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java
@@ -22,8 +22,8 @@ import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.TextViewer;
import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.mylyn.commons.workbench.browser.UrlHyperlink;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskUrlHyperlink;
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskUrlHyperlinkDetector;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.tests.TaskTestUtil;
@@ -63,7 +63,7 @@ public class TaskUrlHyperlinkDetectorTest extends TestCase {
IHyperlink[] links = detect("http://foo", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://foo", ((TaskUrlHyperlink) links[0]).getURLString());
+ assertEquals("http://foo", ((UrlHyperlink) links[0]).getURLString());
}
public void testInvalidUrl() {
@@ -81,39 +81,39 @@ public class TaskUrlHyperlinkDetectorTest extends TestCase {
IHyperlink[] links = detect("(http://foo)", 2, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://foo", ((TaskUrlHyperlink) links[0]).getURLString());
+ assertEquals("http://foo", ((UrlHyperlink) links[0]).getURLString());
links = detect("( http://foo)", 2, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://foo", ((TaskUrlHyperlink) links[0]).getURLString());
+ assertEquals("http://foo", ((UrlHyperlink) links[0]).getURLString());
links = detect("( http://foo).", 2, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://foo", ((TaskUrlHyperlink) links[0]).getURLString());
+ assertEquals("http://foo", ((UrlHyperlink) links[0]).getURLString());
}
public void testClosingParenthesis() {
IHyperlink[] links = detect("http://foo?(bar)", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://foo?(bar)", ((TaskUrlHyperlink) links[0]).getURLString());
+ assertEquals("http://foo?(bar)", ((UrlHyperlink) links[0]).getURLString());
links = detect("(http://foo?(bar))", 0, 18);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://foo?(bar)", ((TaskUrlHyperlink) links[0]).getURLString());
+ assertEquals("http://foo?(bar)", ((UrlHyperlink) links[0]).getURLString());
links = detect("http://foo?((((bar).", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://foo?((((bar)", ((TaskUrlHyperlink) links[0]).getURLString());
+ assertEquals("http://foo?((((bar)", ((UrlHyperlink) links[0]).getURLString());
links = detect("http://foo?(bar))))))))", 0, 0);
assertNotNull(links);
assertEquals(1, links.length);
- assertEquals("http://foo?(bar)", ((TaskUrlHyperlink) links[0]).getURLString());
+ assertEquals("http://foo?(bar)", ((UrlHyperlink) links[0]).getURLString());
}
public void testDetectionUsingExtent() {

Back to the top