Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to change the style of the main application window shell(set custom style of the workbench window shell in eclipse 4)
How to change the style of the main application window shell [message #1219476] Wed, 04 December 2013 00:20
Divya garg is currently offline Divya garg
Messages: 8
Registered: November 2013
Junior Member
Hello,

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.setShowCoolBar(false);
configurer.setShowStatusLine(false);
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?

Thanks



Previous Topic:ToolItem with label and image
Next Topic:PERSPECTIVE_BAR_EXTRAS and SHOW_OPEN_ON_PERSPECTIVE_BAR settings not taken into account
Goto Forum:
  


Current Time: Thu Aug 21 22:02:43 EDT 2014

Powered by FUDForum. Page generated in 0.01477 seconds