Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Losing events from post selection listener(Registered with SelectionService.addPostSelectionListenter, but not receiving events in certain cases)
Losing events from post selection listener [message #545434] Wed, 07 July 2010 18:19 Go to next message
Ciera  is currently offline Ciera Friend
Messages: 5
Registered: June 2010
Junior Member
Hi all,

I've registered an ISelectionListener with the SelectionService using:

getSite().getWorkbenchWindow().getSelectionService().addPostSelectionListener(content)


Most of the time, it works as intended. I get a callback when the user selects, moves the cursor, or after typing is complete.

However, I am missing some events in a deterministic manner. In particular, I can use the arrow keys (or mouse) to click slowly down the editor. Most of the time, I get a callback. However, it periodically "misses". These misses are not timing related, and they are deterministic. I can go back up to that same spot, wait a while, go down again, and it still misses.

In these locations, it doesn't even have to be a caret change with up/down arrows or a mouse click. A couple mouse click, highlighting and selecting an entire word, is also missed.

Should I be using something else? Is this expected behavior or a bug? It does seem to get most of these caret changes, which makes me believe I am using the right API to register.

(BTW: attaching the debugger and putting a breakpoint in my selection callback causes all events to come through. I suspect this is because of focus changes though.)
Re: Losing events from post selection listener [message #545439 is a reply to message #545434] Wed, 07 July 2010 19:04 Go to previous message
Ciera  is currently offline Ciera Friend
Messages: 5
Registered: June 2010
Junior Member
Never mind. Found something in the error log that is a likely culprit.
Previous Topic:-showsplash option does not work
Next Topic:My editor is filtered out during junit test, any ideas why?
Goto Forum:
  


Current Time: Mon Dec 22 02:56:32 GMT 2014

Powered by FUDForum. Page generated in 0.12157 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software