Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Show results at end of job
Show results at end of job [message #448131] Tue, 18 April 2006 19:00
Michael Schmidt is currently offline Michael SchmidtFriend
Messages: 45
Registered: July 2009
Member
Folks,
I hope someone has the time to provide a little help on this seemingly
basic problem. I've read the Jobs-API tutorial and the D'Anjou et al.
section on jobs, as well as searched the mailing lists before bothering
y'all. I want to display an information dialog at the conclusion of a
job, and I also want to take advantage of the job cancellation feature.

Here are code snippets:

protected final IStatus run(final IProgressMonitor monitor)
ends with
} finally {
Application.dbConn.dbLock.release(); // releases the database lock
sbInfo.append("\n*** End Processing Log.\n"); // A String Buffer log
monitor.done();
showResults(sbInfo.toString()); // Calls the display method - problem!
}
return Status.OK_STATUS;

The showResults method:

protected final void showResults(final String message) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
DbInfoDialog dbDialog = new DbInfoDialog(Display.getDefault()
.getActiveShell(), message);
dbDialog.create();
dbDialog.open();
}
});
}

This works fine for a default job, but fails to display the results when
setUser(true) is invoked (unless "Run in Background" is clicked before the
job completes). The Jobs-API tutorial indicated that even if the job is
modal, an asyncExec is used to display results. Apparently not?

Michael Schmidt
Previous Topic:Size of RCP and Customer Feedback
Next Topic:How to determine StyledText content with expanded tabs
Goto Forum:
  


Current Time: Mon Dec 09 13:42:53 GMT 2024

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

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

Back to the top