Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java20
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java21
3 files changed, 24 insertions, 21 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java
index 53730a358..a7ad675be 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/BugzillaStructureBridge.java
@@ -36,8 +36,10 @@ import org.eclipse.mylar.bugzilla.ui.outline.BugzillaReportSelection;
import org.eclipse.mylar.bugzilla.ui.tasks.BugzillaCacheFile;
import org.eclipse.mylar.bugzilla.ui.tasks.BugzillaReportNode;
import org.eclipse.mylar.core.AbstractRelationshipProvider;
+import org.eclipse.mylar.core.IDegreeOfSeparation;
import org.eclipse.mylar.core.IMylarStructureBridge;
import org.eclipse.mylar.core.MylarPlugin;
+import org.eclipse.mylar.core.internal.DegreeOfSeparation;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
@@ -49,6 +51,8 @@ public class BugzillaStructureBridge implements IMylarStructureBridge {
public final static String EXTENSION = "bugzilla";
+ public List<AbstractRelationshipProvider> providers;
+
public String getResourceExtension() {
return EXTENSION;
}
@@ -56,6 +60,8 @@ public class BugzillaStructureBridge implements IMylarStructureBridge {
public BugzillaStructureBridge() {
super();
readCacheFile();
+ providers = new ArrayList<AbstractRelationshipProvider>();
+ providers.add(MylarBugzillaPlugin.getReferenceProvider());
}
/**
@@ -280,7 +286,17 @@ public class BugzillaStructureBridge implements IMylarStructureBridge {
}
public List<AbstractRelationshipProvider> getProviders() {
- // TODO Auto-generated method stub
- return null;
+ return providers;
+ }
+
+ public List<IDegreeOfSeparation> getDegreesOfSeparation() {
+ List <IDegreeOfSeparation> separations = new ArrayList<IDegreeOfSeparation>();
+ separations.add(new DegreeOfSeparation("disabled", 0));
+ separations.add(new DegreeOfSeparation("local, fully qualified matches", 1));
+ separations.add(new DegreeOfSeparation("local, unqualified matches", 2));
+ separations.add(new DegreeOfSeparation("server, fully quaified matches", 3));
+ separations.add(new DegreeOfSeparation("server, unqualified matches", 4));
+
+ return separations;
}
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java
index 5ed8466d2..cf6909134 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/bugzilla/MylarBugzillaPlugin.java
@@ -17,9 +17,8 @@ import org.osgi.framework.BundleContext;
public class MylarBugzillaPlugin extends AbstractUIPlugin implements IStartup {
private static BugzillaMylarBridge bridge = null;
- private static BugzillaReferencesProvider referencesProvider = new BugzillaReferencesProvider();
private BugzillaStructureBridge structureBridge;
-
+ private static BugzillaReferencesProvider referencesProvider = new BugzillaReferencesProvider();
private static MylarBugzillaPlugin plugin;
public MylarBugzillaPlugin() {
@@ -33,7 +32,6 @@ public class MylarBugzillaPlugin extends AbstractUIPlugin implements IStartup {
structureBridge = new BugzillaStructureBridge();
MylarPlugin.getDefault().addBridge(structureBridge);
- MylarPlugin.getContextManager().addListener(referencesProvider);
MylarUiPlugin.getDefault().addAdapter(BugzillaStructureBridge.EXTENSION, new BugzillaUiBridge());
MylarPlugin.getDefault().getSelectionMonitors().add(new BugzillaEditingMonitor());
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java
index d3614feb9..f8a920df4 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/search/BugzillaReferencesProvider.java
@@ -13,7 +13,6 @@
*/
package org.eclipse.mylar.tasks.search;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@@ -29,9 +28,7 @@ import org.eclipse.mylar.bugzilla.BugzillaStructureBridge;
import org.eclipse.mylar.bugzilla.MylarBugzillaPlugin;
import org.eclipse.mylar.bugzilla.ui.tasks.BugzillaReportNode;
import org.eclipse.mylar.core.AbstractRelationshipProvider;
-import org.eclipse.mylar.core.IDegreeOfSeparation;
import org.eclipse.mylar.core.IMylarContextNode;
-import org.eclipse.mylar.core.internal.DegreeOfSeparation;
import org.eclipse.mylar.core.search.IActiveSearchListener;
import org.eclipse.mylar.core.search.IMylarSearchOperation;
@@ -108,6 +105,11 @@ public class BugzillaReferencesProvider extends AbstractRelationshipProvider {
}
@Override
+ public String getGenericId() {
+ return ID;
+ }
+
+ @Override
protected String getSourceId() {
return ID;
}
@@ -142,17 +144,4 @@ public class BugzillaReferencesProvider extends AbstractRelationshipProvider {
public Collection<? extends String> getCachedHandles() {
return reports.keySet();
}
-
- @Override
- public List<IDegreeOfSeparation> getDegreesOfSeparation() {
- List <IDegreeOfSeparation> separations = new ArrayList<IDegreeOfSeparation>();
- separations.add(new DegreeOfSeparation("disabled", 0));
- separations.add(new DegreeOfSeparation("local, fully qualified matches", 1));
- separations.add(new DegreeOfSeparation("local, unqualified matches", 2));
- separations.add(new DegreeOfSeparation("server, fully quaified matches", 3));
- separations.add(new DegreeOfSeparation("server, unqualified matches", 4));
-
- return separations;
- }
-
}

Back to the top