Juno RC4 - Problem with JUnit Plugin Tests [message #887834] |
Sun, 17 June 2012 08:05  |
Bernard Sarter Messages: 88 Registered: August 2011 Location: Paris, France |
Member |
|
|
Hello,
I have a RCP app and Junit plugin tests developed for Indigo and I'm trying to migrate to Juno.
For the RCP app, it's Ok.
For the JUnit tests, I have a problem, if inside a test I try to call:
PlatformUI.getWorkbench().showPerspective("myPerspective",PlatformUI.getWorkbench().getActiveWorkbenchWindow());
nothing happens, ie myPerspective is not displayed automatically.
More generally, the window that is displayed when I run my JUnit Plugin test does NOT contain the menu bar, the status bar, the quick view area, ... it contains only the content (the views) of my default perspective.
I tried to dedug, and I confirm that the code of my preWindowOpen() is executed by the JUnit test, but that the window which is created just after does NOT contain the corresponding bars.
I do NOT have this problem when I start the RCP app normally ...
@Override
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setTitle(myApp");
configurer.setInitialSize(new Point(1024, 768));
configurer.setShowCoolBar(true);
configurer.setShowPerspectiveBar(true);
configurer.setShowProgressIndicator(true);
configurer.setShowFastViewBars(true);
configurer.setShowMenuBar(true);
IPreferenceStore apiStore = PlatformUI.getPreferenceStore();
apiStore.setValue(IWorkbenchPreferenceConstants.DOCK_PERSPECTIVE_BAR,
"TOP_RIGHT");
configurer.setShowStatusLine(true);
}
Any suggestion welcome ...
Best regards,
Bernard.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02076 seconds