Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Detecting shell opened from background Job
Detecting shell opened from background Job [message #530229] Wed, 28 April 2010 23:57
Richard Adams is currently offline Richard AdamsFriend
Messages: 77
Registered: July 2009
Location: Edinburgh
Member
Hello
I have some code that runs in an org.eclipse.core.runtime.jobs.Job subclass.
@Override
	protected IStatus run(IProgressMonitor monitor) {
		try {
		exec.executeCommands(new EclipseProgressMonitorAdapter(monitor));
		 final DispatcherScriptOutput output = exec.getDispatcherOutput();
		  // show results in a dialog.
        	 Display.getDefault().syncExec(new Runnable() {		
 				public void run() {
 					 Dialog d = new SBMLConversionFailureDialog(Display.getDefault().getActiveShell(), output);
 					 d.open();
 					 
 				}
 			});

I.e., this code is executed in a background thread, and pops up a report Dialog when it is finished.
But, the dialog shell is not detected by SWTBot
E.g., in my test:
bot.waitUntil(new ShellIsActive(SBMLConversionFailureDialog.TITLE),20000);


If I run the job in the UI thread( i.e., not in a background job) the test works fine.
Is there a way to detect a shell launched from a non UI thread?

Many thanks
Richard




Previous Topic:Is there no more eclipse spy-bot view?
Next Topic:RCP with SWTBOT
Goto Forum:
  


Current Time: Thu Apr 25 11:53:53 GMT 2024

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

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

Back to the top