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
I have some code that runs in an subclass.
	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);;

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

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

Current Time: Tue Dec 07 13:19:04 GMT 2021

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

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

Back to the top