With WindowTester I open a xml file in an editor and do some typing. Now I want to see, if the contents are correct.
With the following code I normally I can get the active page:
- Code: Select all
IWorkbench wb = PlatformUI.getWorkbench();
IWorkbenchWindow wbWindow = wb.getActiveWorkbenchWindow();
IWorkbenchPage page = wbWindow.getActivePage();
But the call of wb.getActiveWorkbenchWindow() returns null. Does that mean that I am not on the ui thread?
But why? The debugger shows me if I set a breakpoint at the line, that the active Thread is the "WT Test Thread". That should be the ui thread, shouldnt it?
How can I get the active page respective the actual editor contents, if I am in a test case?
Thanks for help.
Michael