Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-08-17 16:11:22 -0400
committersminto2005-08-17 16:11:22 -0400
commit363b3b3b74cd20ae564219f389240c037202ad49 (patch)
treef180519acc17c80f28d492bc2c2aac1475800aca
parent3e66dfb1b3d51bcb49405a1dd3c6f1771d85732c (diff)
downloadorg.eclipse.mylyn.tasks-363b3b3b74cd20ae564219f389240c037202ad49.tar.gz
org.eclipse.mylyn.tasks-363b3b3b74cd20ae564219f389240c037202ad49.tar.xz
org.eclipse.mylyn.tasks-363b3b3b74cd20ae564219f389240c037202ad49.zip
fixed Bug #103866: Crtl-click in the code to navigate to bug
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugs/java/BugzillaHyperLinkDetector.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugs/java/BugzillaHyperLinkDetector.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugs/java/BugzillaHyperLinkDetector.java
index b4a7711e0..d9a04eeae 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugs/java/BugzillaHyperLinkDetector.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugs/java/BugzillaHyperLinkDetector.java
@@ -106,13 +106,24 @@ public class BugzillaHyperLinkDetector extends AbstractMylarHyperlinkDetector {
m = p.matcher(comment.toLowerCase().trim());
boolean b2 = m.matches();
+ p = Pattern.compile("^.*bug\\s#\\d+.*");
+ m = p.matcher(comment.toLowerCase().trim());
+ boolean b3 = m.matches();
+
+ p = Pattern.compile("^.*bug#\\d+.*");
+ m = p.matcher(comment.toLowerCase().trim());
+ boolean b4 = m.matches();
+
// XXX walk forward from where we are
- if(b || b2){
+ if(b || b2 || b3 || b4){
int start = comment.toLowerCase().indexOf("bug");
int ahead = 4;
- if(b2)
- ahead = 5;
+ if(b2 || b3 || b4){
+ int pound = comment.toLowerCase().indexOf("#", start);
+ ahead = pound - start + 1;
+ System.out.println(ahead);
+ }
String endComment = comment.substring(start+ahead, comment.length());
endComment = endComment.trim();
int endCommentStart = comment.indexOf(endComment);

Back to the top