Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Shell setMaximized issue(Shell setMaximized(true) is incorrect after long processing in postWindowOpen())
Shell setMaximized issue [message #1403881] Mon, 28 July 2014 12:09 Go to next message
laurent russo is currently offline laurent russoFriend
Messages: 3
Registered: July 2014
Junior Member
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)).
Re: Shell setMaximized issue [message #1404013 is a reply to message #1403881] Tue, 29 July 2014 07:26 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 1978
Registered: July 2009
Senior Member
Hi,
which RAP version are you using? Please open a bugzilla and attach
complete snippet/project/patch in order to reproduce it.
Thanks,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Shell setMaximized issue [message #1404568 is a reply to message #1403881] Mon, 04 August 2014 08:16 Go to previous message
laurent russo is currently offline laurent russoFriend
Messages: 3
Registered: July 2014
Junior Member
laurent russo wrote on Mon, 28 July 2014 08:09
We have a recurring problem on maximizing the shell during a long processing in postWindowOpen().

Relative link on Bugzilla : https://bugs.eclipse.org/bugs/show_bug.cgi?id=440948
Previous Topic:Sometime raising exception.
Next Topic:RAP 2.3 and eclipse e4 single-sourced RCP (soft migrated)
Goto Forum:
  


Current Time: Tue Aug 04 15:57:04 GMT 2015

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

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