[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[mylyn-integrators] Problems adding (non-IResource) context
|
I'm trying to add a new context that monitors use of static analysis findings (think FindBugs). The trouble is that the context is not a File (or IResource) it is stored in a database.
I implemented a plug-in that registers
<extension
point="org.eclipse.mylyn.context.core.bridges">
<structureBridge
class="com.surelogic.sierra.mylyn.FindingContextStructureBridge"
name="com.surelogic.sierra.mylyn.FindingContextStructureBridge">
</structureBridge>
</extension>Where the FindingContextStructureBridge is a bridge to my FindingDetails type. It uses a string representation of our finding identifer (a long) as its handle identifier.
Now I added a listener in my mylyn plug-in to monitor selection of findings that does the following:
private static final FindingDetailsView.IFindingSelectionObserver OBS = new FindingDetailsView.IFindingSelectionObserver() {
public void selectionNotify(long findingId) {
System.out.println("selectionNotify(" + findingId + ")");
final InteractionContextManager icm = ContextCorePlugin
.getContextManager();
final String handle = Long.toString(findingId);
final InteractionEvent event = new InteractionEvent(
InteractionEvent.Kind.SELECTION,
FindingContextStructureBridge.CONTENT_TYPE_FINDING, handle,
FindingDetailsView.ID);
icm.processInteractionEvent(event);
}
};When I run this I see the selections, however, nothing shows up in the context of the activated task (I'm testing with a local task).
I'm also not seeing anything in the workspace-dir/.mylyn/monitor-log.xml
Thanks in advance for any tips/help!
Tim