Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-06-21 18:00:31 -0400
committersminto2005-06-21 18:00:31 -0400
commit3ee44ff23fcfaf1923f0301ca98df3e9ab576144 (patch)
treecb9f1f10f5d693a6ab95dffcd5d296bf4df5ad05
parente4fffd9c11e501d7ac2a7cee36466f959586b9ce (diff)
downloadorg.eclipse.mylyn.tasks-3ee44ff23fcfaf1923f0301ca98df3e9ab576144.tar.gz
org.eclipse.mylyn.tasks-3ee44ff23fcfaf1923f0301ca98df3e9ab576144.tar.xz
org.eclipse.mylyn.tasks-3ee44ff23fcfaf1923f0301ca98df3e9ab576144.zip
BugzillaSearchHit should contain the server that the hit was found onR_0_2_4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchEngine.java11
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchHit.java15
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/BugzillaReportNode.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java2
5 files changed, 25 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchEngine.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchEngine.java
index 3bac1592f..2a02735b3 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchEngine.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchEngine.java
@@ -190,7 +190,9 @@ public class BugzillaSearchEngine {
if (query == null)
query = "";
- BugzillaSearchHit hit = new BugzillaSearchHit(id, description, severity, priority, platform, state, result, owner, query);
+ String server = BugzillaPlugin.getDefault().getServerName();
+
+ BugzillaSearchHit hit = new BugzillaSearchHit(id, description, severity, priority, platform, state, result, owner, query, server);
collector.accept(hit);
numCollected++;
}
@@ -237,8 +239,11 @@ public class BugzillaSearchEngine {
String description = line.substring(8);
String query = BugzillaPlugin.getMostRecentQuery();
if (query == null)
- query = "";
- BugzillaSearchHit hit = new BugzillaSearchHit(id, description, severity, priority, platform, state, result, owner, query);
+ query = "";
+
+ String server = BugzillaPlugin.getDefault().getServerName();
+
+ BugzillaSearchHit hit = new BugzillaSearchHit(id, description, severity, priority, platform, state, result, owner, query, server);
collector.accept(hit);
numCollected++;
}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchHit.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchHit.java
index fed8ba051..9ed4430e7 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchHit.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/search/BugzillaSearchHit.java
@@ -37,6 +37,9 @@ import org.eclipse.ui.PartInitException;
*/
public class BugzillaSearchHit
{
+ /** The server that the result was from */
+ private String server;
+
/** The bug id */
private int id;
@@ -79,7 +82,7 @@ public class BugzillaSearchHit
* @param owner The owner of the bug
* @param query the query that the bug was a result of
*/
- public BugzillaSearchHit(int id, String description, String severity, String priority, String platform, String state, String result, String owner, String query)
+ public BugzillaSearchHit(int id, String description, String severity, String priority, String platform, String state, String result, String owner, String query, String server)
{
this.id = id;
this.description = description;
@@ -90,6 +93,16 @@ public class BugzillaSearchHit
this.result = result;
this.owner = owner;
this.query = query;
+ this.server = server;
+ }
+
+ /**
+ * Get the bugs server
+ * @return The server the bug resides on
+ */
+ public String getServer()
+ {
+ return server;
}
/**
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java
index f1ac990e6..1ca6993e0 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/bugzilla/tests/BugzillaStackTraceTest.java
@@ -139,7 +139,7 @@ public class BugzillaStackTraceTest extends TestCase {
private void performParse(int bugNumber, String bugFileName, int numTracesExpected, boolean printStackTraces){
- BugzillaSearchHit hit = new BugzillaSearchHit(bugNumber,"","","","","","","",""); // stack trace in desc and com
+ BugzillaSearchHit hit = new BugzillaSearchHit(bugNumber,"","","","","","","","", "<TEST-SERVER>"); // stack trace in desc and com
// create a new doi info
BugzillaReportNode doi = new BugzillaReportNode(0, hit, false);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/BugzillaReportNode.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/BugzillaReportNode.java
index 54c282a66..6ac4c26a5 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/BugzillaReportNode.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/BugzillaReportNode.java
@@ -179,6 +179,6 @@ public class BugzillaReportNode {
}
public String getElementHandle() {
- return "<server-id>;" + hit.getId();
+ return hit.getServer() + ";" + hit.getId();
}
} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java
index eb2661326..04f632e81 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/bugzilla/search/BugzillaMylarSearchOperation.java
@@ -214,7 +214,7 @@ public class BugzillaMylarSearchOperation extends WorkspaceModifyOperation
if(isHit){
// make a search hit from the bug and then add it to the collector
- BugzillaSearchHit hit = new BugzillaSearchHit(bug.getId(), bug.getDescription(), "","","","","","","");
+ BugzillaSearchHit hit = new BugzillaSearchHit(bug.getId(), bug.getDescription(), "","","","","","","", bug.getServer());
try{
searchCollector.accept(hit);
}catch(CoreException e){

Back to the top