Community
Participate
Working Groups
I have a partstack that is included via a placeholder. When one tries to minimize the part a NPE is thrown: Caused by: java.lang.NullPointerException at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.minimize(MinMaxAddon.java:670) at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.subscribeTopicTagsChanged(MinMaxAddon.java:405) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) ... 45 more
Pressing the "maximize" button throws: Caused by: java.lang.IllegalArgumentException: at org.eclipse.core.runtime.Assert.isLegal(Assert.java:66) at org.eclipse.core.runtime.Assert.isLegal(Assert.java:50) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElementsRecursive(ModelServiceImpl.java:175) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElements(ModelServiceImpl.java:437) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElements(ModelServiceImpl.java:430) at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.findValidElementsToMinimize(MinMaxAddon.java:854) at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.getElementsToMinimize(MinMaxAddon.java:797) at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.maximize(MinMaxAddon.java:733) at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.subscribeTopicTagsChanged(MinMaxAddon.java:407) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) ... 45 more
Is this a regression in 4.20? Can you attach the code to reproduce?
This is the first time that I hear that a partstack is actually included with a placeholder, so far I only seen it used for MArea and MPart. I expect that this use-case is not well tested and could contain more bug. In this case, MinMaxAddonUtil.getWindowFor(element) incorrectly returns null for partstack (or for any shared element). The assumption documented in the code is incorrect: // We rely here on the fact that a DW's 'getParent' will return // null since it's not in the 'children' hierarchy For a to be defined method on EModelService see Bug 562916. The addition of unit tests for these cases would be highly valued.
@Andrey I don't think this is a regression, so no worries. @Rolf I think you are right that this is very "unusual" I'm currently experimenting a bit with an E4 Application that allows to be extended by plugins beyond the usual eclipse way. I first tried to use an MArea for that but that don't worked at all (the area was always empty, probably another uncovered area) and currently using a PartSash (what works but lacks the MinMax of course).