Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How can I prompt a question to user during a Job without losing the background thread?(Prompting a user at a decision point results in the rest of the Job running on the UI thread)
How can I prompt a question to user during a Job without losing the background thread? [message #735235] Tue, 11 October 2011 10:00
John Ormerod is currently offline John OrmerodFriend
Messages: 39
Registered: January 2010
Member
Hello
I have a file import that can import multiple files, which I run in a Job. For each file I have to parse the header info in order to know its key, which I then look to see if it already exists in the database. If it does, I show a MessageDialog.openQuestion to ask the user if they want to overwrite or skip.

Whilst this works technically, the rest of the import runs on the UI thread, and I can't interact with the Job's Dialog.

I use Display.getDefault.syncExec() to display the question, as I need to halt the processing at this point.

I'm sure I noticed a similar case when installing a new Feature, looked the download was a Job, and at points it pops up a dialog to ask me questions.

Hope someone knows the answer

Regards, John
Previous Topic:Feature based export does not work
Next Topic:java.lang.UnsatisfiedLinkError: wrong elf class elfclass32
Goto Forum:
  


Current Time: Fri Apr 19 21:27:47 GMT 2024

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

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

Back to the top