1 package org
.argeo
.suite
.e4
.rap
;
3 import javax
.annotation
.PostConstruct
;
5 import org
.eclipse
.e4
.ui
.model
.application
.MApplication
;
6 import org
.eclipse
.e4
.ui
.model
.application
.ui
.basic
.MWindow
;
7 import org
.eclipse
.e4
.ui
.workbench
.modeling
.EModelService
;
8 import org
.eclipse
.swt
.SWT
;
10 public class RapMainShellAddon
{
11 private final static String STYLE_OVERRIDE
= "styleOverride";
12 private final static String SHELL_MAXIMIZED
= "shellMaximized";
15 void init(EModelService modelService
, MApplication application
) {
16 MWindow window
= (MWindow
) modelService
.find("org.argeo.suite.e4.trimmedwindow.main", application
);
17 String currentStyle
= window
.getPersistedState().get(STYLE_OVERRIDE
);
19 if (currentStyle
!= null) {
20 style
= Integer
.parseInt(currentStyle
);
22 style
= style
| SWT
.NO_TRIM
;
23 window
.getPersistedState().put(STYLE_OVERRIDE
, Integer
.toString(style
));
24 window
.getTags().add(SHELL_MAXIMIZED
);