The style for the shell cannot be changed after creation, and the shell itself cannot be exchanged after it has been created by the visualizer. But the situation is not hopeless.
Eclipse 4 uses visualization tools to create user interface elements from an application model. These renderers can be exchanged using the Rendering Framework, and this is one of the possible ways to create a shell with a style other than the standard one.
The solution will write its own visualization tool for UIElements such as MWindow, providing the WorkbenchRendererFactory for creating a new SWT rendering for MWindows and registering a new factory with the product.
Default: WBWRenderer shell creation
WBWRenderer (desktop window rendering) is the standard visualization tool for MWTow type SWT elements.
In WBWRenderer#createWidget wrapper is created with the SWT.SHELL_TRIM style, which is a convenient style for SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE :
wbwShell = new Shell(Display.getCurrent(), SWT.SHELL_TRIM | rtlStyle);
This will cause TrimmedWindow to be maximized and modified without the ability to change this behavior after creation.
Shell creation by new renderer
To get around the above limitation, you can provide another renderer using WBWRenderer as a template. This allows you to change the code to create a shell, for example.
wbwShell = new Shell(Display.getCurrent(), SWT.CLOSE | SWT.TITLE | SWT.MIN | rtlStyle);
This renderer should be returned by the WorkbenchRendererFactory as the renderer used to display MWindows. In addition, the factory renderer must be added as a product property in the plugin.xml file.
These changes will cause TrimmedWindow to not be maximized or modified.
An example of how to write and register a WorkbenchRendererFactory can be found here .
The best solution?
In fact, there may be a better way to create SWT shells, since WBWRenderer already uses tags to determine the behavior of MWindow: shellMaximized and shellMinimized . These tags can be set on an additional tab of the cropped window in the application model editor.
If you can set swt style tags in the same way, you can use them to set the shell style. This will be a feature request for Eclipse.