问题
I'm working on a project with a main window consisting of a mpartstack where I add parts dynamically from another part. The problem is that when the last part gets closed the mpartstack disappears and the other part takes up all the space. When I try to add new parts nothing happens.
I've tried fiddling around with the preDestroy function in the parts that are added to the stack by trying to add a new part. The preDestroy works occasionally but far from satisfactory.
I've looked far and wide to try to find any clue on what to do but I've found nothing except for some bug reports on the matter.
So: can a mpartstack be in a uncloseable state or is there any textbook way to intercept a part that is about to be closed?
Thanks in advance /K
回答1:
Add the tag NoAutoCollapse
to the MPartStack
definition in the model.
来源:https://stackoverflow.com/questions/18790760/how-to-make-an-eclipse-partstack-not-disappear-when-the-last-part-is-closed