Community
Participate
Working Groups
// find the correct place to start the insertion
MUIElement insertRoot = relTo.getParent();
while (insertRoot != null && !(insertRoot instanceof MWindow)
&& !(insertRoot instanceof MPartSashContainer)) {
&& !(insertRoot instanceof MPartSashContainer)
&& !(insertRoot instanceof MPerspective)) {
relTo = (MPartSashContainerElement) insertRoot;
insertRoot = insertRoot.getParent();
}
if (insertRoot instanceof MWindow || insertRoot instanceof MArea) {
if (insertRoot instanceof MWindow || insertRoot instanceof MArea
|| insertRoot instanceof MPerspective) {
// OK, we're certainly going to need a new sash
MPartSashContainer newSash = BasicFactoryImpl.eINSTANCE.createPartSashContainer();
newSash.setHorizontal(where == LEFT_OF || where == RIGHT_OF);