Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-08-19 17:12:52 -0400
committerSteffen Pingel2011-08-19 17:12:52 -0400
commit348a60ac006060ec5d11f001936ffaa51b637834 (patch)
tree2c768fd1343db52a80b7913090f3c26ef7723247
parentf6964d3b491f8cf66c6fead47ca3d626ab1d72c6 (diff)
downloadorg.eclipse.mylyn.tasks-348a60ac006060ec5d11f001936ffaa51b637834.tar.gz
org.eclipse.mylyn.tasks-348a60ac006060ec5d11f001936ffaa51b637834.tar.xz
org.eclipse.mylyn.tasks-348a60ac006060ec5d11f001936ffaa51b637834.zip
NEW - bug 350931: [patch] Trac task editor detects illegal camel case
tracwiki links https://bugs.eclipse.org/bugs/show_bug.cgi?id=350931
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracHyperlinkUtilTest.java7
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java2
2 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracHyperlinkUtilTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracHyperlinkUtilTest.java
index ac6759709..683a56a21 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracHyperlinkUtilTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/ui/TracHyperlinkUtilTest.java
@@ -8,6 +8,7 @@
* Contributors:
* Steffen Pingel - initial API and implementation
* David Green - improvements
+ * Jan Mauersberger - fixes for bug 350931
*******************************************************************************/
package org.eclipse.mylyn.trac.tests.ui;
@@ -228,8 +229,12 @@ public class TracHyperlinkUtilTest extends TestCase {
links = findTracHyperlinks(repository, "a !WikiPage is here", 4, 0);
assertNull(links);
+ }
+
+ public void testFindHyperlinksWikiTwoCamelCaseWork() {
+ IHyperlink[] links = findTracHyperlinks(repository, "aWIkiPage is here", 2, 0);
+ assertNull(links);
- // bug 350931 (two upper case characters in camel case word)
links = findTracHyperlinks(repository, "aWIkiPage is here", 4, 0);
assertNull(links);
}
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
index fbe949b18..21b164c49 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java
@@ -61,7 +61,7 @@ public class TracHyperlinkUtil {
static Pattern wikiPattern1 = createPattern("wiki:(\\w+)"); //$NON-NLS-1$
- static Pattern wikiPattern2 = Pattern.compile("(?<![!.a-z])[A-Z][a-z0-9]+[A-Z]\\w*"); //$NON-NLS-1$
+ static Pattern wikiPattern2 = Pattern.compile("(?<![!.a-zA-Z])[A-Z][a-z0-9]+[A-Z]\\w*"); //$NON-NLS-1$
static Pattern milestonePattern = createPattern("milestone:([\\w\\.]+)"); //$NON-NLS-1$

Back to the top