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

Bug 299582

Summary: The InteractionEvent stream does not include select or edit events unless a context has been activated
Product: z_Archived Reporter: Emerson Murphy-Hill <captain.emerson>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: minor    
Priority: P3 CC: shawn.minto
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on:    
Bug Blocks: 292206    

Description Emerson Murphy-Hill CLA 2010-01-13 18:53:03 EST
Build Identifier: 20090920-1017

I would like to listen for several different kinds of InteractionEvents, especially edit ones.  So I add a listener like so:
MonitorUiPlugin.getDefault().addInteractionListener(new IInteractionEventListener() {
  public void interactionObserved(InteractionEvent event) {				
	//I do something useful here
}
...
As expected, I get InteractionEvents for perspective changes. However, I do not get any SELECT or EDIT events as I would expect.


Some notes:
- if you add this: ContextCore.getContextManager().activateContext("xxx"), then the code above works as I expect.
- this appears to be because the edit listeners (such as JavaEditingMonitor) don't get added until ContextUIPlugin's lazy start, which apparently doesn't get called unless a context is activated.
-another way to test this is to run monitor.usage and notice that the generated monitor log does not contain any edit or select events, so long as you don't use contexts.

Reproducible: Always

Steps to Reproduce:
1. Make sure no contexts are active at startup time.
2. Register an InteractionEventListener
3. Observe that no edit or select events are
Comment 1 Steffen Pingel CLA 2010-01-13 20:35:17 EST
Thanks for the detailed description. This is essentially bug 292206. I think that rather than coupling initialization to context ui startup it should be based on whether listeners are registered or not. We should consider changing the architecture when we generalize the monitor.
Comment 2 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn