Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse Job doesn't have a sleep(long timeout) API(Delay and run a job )
Eclipse Job doesn't have a sleep(long timeout) API [message #1022116] Thu, 21 March 2013 05:54 Go to next message
Maqsood Ahmed is currently offline Maqsood Ahmed
Messages: 41
Registered: September 2010
Member
Hi all,

Problem :

Based on selection in the outline view, i must trigger a selection in the editor area with DELAY.

How can i do it?

I tried to use Job but it has no sleep(timeout) . Besides Thread.sleep() will block my UI.

Solution I chose :
I added a key adapter to the outline page treeviewer and then maintain flags to indicate if the if the arrow keys are released then i trigger a selection.

In the selection listener of the treeviewer i check if the flags(arrowreleased = true && arrowpressed = false) then i trigger a selection, Also i trigger on keyReleased() method. It works now. Is there a way to achieve the same using Jobs/Scheduling?

[Updated on: Thu, 21 March 2013 08:41]

Report message to a moderator

Re: Eclipse Job doesn't have a sleep(long timeout) API [message #1022762 is a reply to message #1022116] Fri, 22 March 2013 09:30 Go to previous message
Brian de Alwis is currently offline Brian de Alwis
Messages: 127
Registered: January 2012
Senior Member

Use Dspay.timerExec()?
Previous Topic:Contributing commands to multiple instances of the same view
Next Topic:Eclipse with Processing
Goto Forum:
  


Current Time: Sat Apr 19 13:13:28 EDT 2014

Powered by FUDForum. Page generated in 0.01455 seconds