void () { final CommanderPanel activePanel; final CommanderPanel passivePanel; if (isLeftPanelActive()) { activePanel = myLeftPanel; passivePanel = myRightPanel; } else { activePanel = myRightPanel; passivePanel = myLeftPanel; } ProjectViewNode element = (ProjectViewNode)activePanel.getBuilder().getParentNode(); passivePanel.getBuilder().enterElement(element); }