Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 197181

Summary: [api] make duplicate detection support generic
Product: z_Archived Reporter: Mik Kersten <mik.kersten>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: murphy, robert.elves, steffen.pingel, tomasz.zarna
Version: unspecified   
Target Milestone: 3.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 195079, 197513    
Attachments:
Description Flags
mylyn/context/zip none

Description Mik Kersten CLA 2007-07-19 13:46:12 EDT
Here's how we could make the support for duplicate detectors generic.
1) Generic duplicate detectors are not specified by connectors but by plug-ins that understand the corresponding structure (e.g. a Java stack trace detector belongs in the a Java plugin, a natural language detector could go straight into the tasks.ui plug-in).  This can be done via the AbstractRepositoryConnector.performQuery(..) method that takes specialized parameters (e.g. a subtype of AbstractRepositoryQuery)
2) Connectors should be able to specify whether or not they support generic detection (i.e. have the search facilities needed).  Might make sense to do this via a method AbstractRepositoryConnector. 
3) Connector specific detectors can be supported to make use of the repositories duplicate detection facilities, if available.  In this case the connector itself would specify a custom duplicate detector.
Comment 1 Eugene Kuleshov CLA 2007-11-14 11:16:44 EST
I think it would be more beneficial in a long run to make AbstractRepositoryQuery generic to all connectors, so they won't have to subclass it.
Comment 2 Mik Kersten CLA 2008-05-13 16:37:05 EDT
Steffen: do we have anything left here?  I've lost track of the recent duplicate detector changes.
Comment 3 Mik Kersten CLA 2008-05-13 16:43:59 EDT
Consider for 3.0.
Comment 4 Steffen Pingel CLA 2008-05-14 00:08:30 EDT
I have added a new class named AbstractSearchHandler to an internal package in tasks.core. Connectors can extend this class to provide a generic search facility for text by implementing this method:

 public abstract boolean queryForText(TaskRepository taskRepository, IRepositoryQuery query, TaskData taskData, String text);
 
Search handlers have to be registered by invoking TasksUiPlugin.getDefault().addSearchHandler(). Tasks UI contributes a generic stack trace detector that invokes the appropriate search handler if one exists.

We can consider making this API once the search handler interface has been stabilized.
Comment 5 Steffen Pingel CLA 2008-05-14 00:08:37 EDT
Created attachment 100113 [details]
mylyn/context/zip