diff options
author | mkersten | 2007-06-18 05:02:53 +0000 |
---|---|---|
committer | mkersten | 2007-06-18 05:02:53 +0000 |
commit | c445ce1c78b940a0586a3ded6b7cc894f2ab64fe (patch) | |
tree | f3f0b16dea07d51514a71e04b633846a986831e1 /org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn | |
parent | d4c4bd1648accbd5c5ea5a15ca6c8b609ca9a8cd (diff) | |
download | org.eclipse.mylyn.tasks-c445ce1c78b940a0586a3ded6b7cc894f2ab64fe.tar.gz org.eclipse.mylyn.tasks-c445ce1c78b940a0586a3ded6b7cc894f2ab64fe.tar.xz org.eclipse.mylyn.tasks-c445ce1c78b940a0586a3ded6b7cc894f2ab64fe.zip |
RESOLVED - bug 156061: Search for duplicates should be available in existing task editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=156061
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn')
2 files changed, 35 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java index b53898606..46ee0499e 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java @@ -33,12 +33,14 @@ import org.eclipse.mylyn.tasks.core.AbstractTask; import org.eclipse.mylyn.tasks.core.RepositoryOperation; import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; import org.eclipse.mylyn.tasks.core.TaskComment; +import org.eclipse.mylyn.tasks.ui.AbstractDuplicateDetector; import org.eclipse.mylyn.tasks.ui.DatePicker; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.mylyn.tasks.ui.TasksUiUtil; import org.eclipse.mylyn.tasks.ui.editors.AbstractRepositoryTaskEditor; import org.eclipse.mylyn.tasks.ui.editors.RepositoryTaskSelection; import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; +import org.eclipse.mylyn.tasks.ui.search.SearchHitCollector; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; @@ -357,7 +359,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor { try { operation = BUGZILLA_OPERATION.valueOf(repositoryOperation.getKnobName()); } catch (RuntimeException e) { - StatusManager.log(e, "Unrecognized operatoin: " + repositoryOperation.getKnobName()); + StatusManager.log(e, "Unrecognized operation: " + repositoryOperation.getKnobName()); operation = null; } @@ -722,4 +724,29 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor { return null; } } + + @Override + /** + * This method is duplicated in NewBugzillaTaskEditor for now. + */ + public SearchHitCollector getDuplicateSearchCollector(String name) { + String duplicateDetectorName = name.equals("default") ? "Stack Trace" : name; + java.util.List<AbstractDuplicateDetector> allDetectors = getDuplicateSearchCollectorsList(); + + for (AbstractDuplicateDetector detector : allDetectors) { + if (detector.getName().equals(duplicateDetectorName)) { + return detector.getSearchHitCollector(repository, taskData); + } + } + // didn't find it + return null; + } + + @Override + /** + * This method is duplicated in NewBugzillaTaskEditor for now. + */ + protected java.util.List<AbstractDuplicateDetector> getDuplicateSearchCollectorsList() { + return TasksUiPlugin.getDefault().getDuplicateSearchCollectorsList(); + } }
\ No newline at end of file diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java index aa1d16e86..b5af165eb 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/NewBugzillaTaskEditor.java @@ -100,6 +100,9 @@ public class NewBugzillaTaskEditor extends AbstractNewRepositoryTaskEditor { } @Override + /** + * This method is duplicated in BugzillaTaskEditor for now. + */ public SearchHitCollector getDuplicateSearchCollector(String name) { String duplicateDetectorName = name.equals("default") ? "Stack Trace" : name; List<AbstractDuplicateDetector> allDetectors = getDuplicateSearchCollectorsList(); @@ -113,6 +116,10 @@ public class NewBugzillaTaskEditor extends AbstractNewRepositoryTaskEditor { return null; } + @Override + /** + * This method is duplicated in BugzillaTaskEditor for now. + */ protected List<AbstractDuplicateDetector> getDuplicateSearchCollectorsList() { return TasksUiPlugin.getDefault().getDuplicateSearchCollectorsList(); } |