|How to change the style of the main application window shell [message #1219476]
||Wed, 04 December 2013 05:20
| Divya garg
Registered: November 2013
I am migrating my application from eclipse 3.x to eclipse 4.3 and I want to set the style of the main application window i.e. the shell that is created in application MTrimmedWindow in e4.
Earlier we were doing it using
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(0, 0));
configurer.setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE);
But now in e4 application after reading some forum replies I got to know that custom renderer needs to be created for that.
I created my own renderer extending WBWRenderer and as I wanted to change the style of shell I am overriding createWidget method.
Now the problem is that if I am just creating a new shell in this createWidget method then it is not working. Might be because this method has a lot of other code also.
So I copied all this code into my overridden method of createWidget & just changed the style of shell according to my need. Then this worked but for this I have to put some private methods also into my custom renderer class from WBWRenderer.
SO my question is to confirm that if I am doing it in a right way?
or is there any other mechanism to do this in a more efficient way?
Powered by FUDForum
. Page generated in 0.12681 seconds