Shell setMaximized issue [message #1403881] |
Mon, 28 July 2014 08:09  |
Eclipse User |
|
|
|
We have a recurring problem on maximizing the shell during a long processing in postWindowOpen().
This issue occurs during workbench's creation when the user decide to manipulate browser's window size.
3 important points are to be considered :
a simple App -> shellStyle(SWT.NO_TRIM)
a long process -> Thread.sleep(3000)
a maximized Shell -> shell.setMaximized(true);
We can reproduce this behavior in RAP demo by modifying a few lines in the DemoWorkbenchWindowAdvisor :
in preWindowOpen() we define:
getWindowConfigurer () setShellStyle (SWT.NO_TRIM).;
in postWindowOpen() we add a pause to simulate a long process:
try {
Thread.sleep (3000);
} Catch (InterruptedException e) {
e.printStackTrace ();
}
and to maximize of the view,we overload the postWindowCreate() method:
IWorkbench PlatformUI.getWorkbench workbench = ();
IWorkbenchWindow workbench.getActiveWorkbenchWindow window = ();
Shell shell = window.getShell ();
shell.setMaximized (true);
super.postWindowCreate ();
To reproduce this issue we have to proceed the following three steps quickly chained:
1) Reduce the size of the window to a quarter of the screen size.
2) Press the 'F5' key and ...
3) immediately change the size of the browser window.
When the Demo Application finally appears, it occupies the same size that the browser's window have before the processing (sleep (3000)).
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07216 seconds