How to get the Maximized State of a Window
To check if a window is maximized in Eclipse e4 a MWindow instance is needed. It may me retrieved from the MApplication instance (which can be injected like @Inject MApplication application
).
If the window is maximized it still holds its original size and not the maximized size. But it gets a tag in its tag list which can be queried like this:
if (window.getTags().contains(IPresentationEngine.WINDOW_MAXIMIZED_TAG)) { ... }