Hello SWTBot Userlist,.
I ran the Recorder in the Eclipse 3.4 and I have provided the
following values in the argument section.
* org.eclipse.swt.examples.addressbook.AddressBook* - Here AddressBook is
the class under the package - *org.eclipse.swt.examples.addressbook*
and included the following values in the VM Argument section:
-Dnet.sf.swtbot.recorder.actions.print=true
Follwing exception is reported:
Exception in thread "main" *java.lang.IllegalStateException*: Could not find
a display
at net.sf.swtbot.utils.SWTUtils.display(*SWTUtils.java:245*)
at net.sf.swtbot.recorder.ui.SWTBotRecorderUI.waitForDisplayToAppear(*
SWTBotRecorderUI.java:179*)
at net.sf.swtbot.recorder.ui.SWTBotRecorderUI.initialize(*
SWTBotRecorderUI.java:65*)
at net.sf.swtbot.recorder.ui.Main.start(*Main.java:51*)
at net.sf.swtbot.recorder.ui.Main.main(*Main.java:36*)
Please note that I am facing this problem in running mode, It works fine in
the Debugging mode.
On debugging the code I found that it is giving the exception in the
following code
*net.sf.swtbot.utils.SWTUtils.display*
*public** static** Display display() {*
*if ((display** == null) || display**.isDisposed()) {*
*display** = null**;*
*Thread[] allThreads = allThreads();*
*for (int i = 0; i < allThreads.length**; i++) {*
*Thread thread = allThreads[i];*
*Display d = Display.findDisplay(thread);*
*if (d != null**)*
*display** = d;*
*}*
*if (display** == null**)*
*throw new IllegalStateException("Could not find a display"**);*
*}*
*return display**;*
*}*
Please let me know whats the problem in the above code:
Thanks and Regards
Nawaz Ahmed
|