return getWorkbenchPanelPresenter( panel ).getPanelView();
}
private void removePanel( final PanelDefinition panelToRemove,
final PanelDefinition panelToSearch ) {
final PanelDefinition northChild = panelToSearch.getChild( Position.NORTH );
final PanelDefinition southChild = panelToSearch.getChild( Position.SOUTH );
final PanelDefinition eastChild = panelToSearch.getChild( Position.EAST );
final PanelDefinition westChild = panelToSearch.getChild( Position.WEST );
if ( northChild != null ) {
if ( northChild.equals( panelToRemove ) ) {
mapPanelDefinitionToPresenter.remove( northChild );
removePanel( panelToRemove,
panelToSearch,
Position.NORTH );
} else {
removePanel( panelToRemove,
northChild );
}
}
if ( southChild != null ) {
if ( southChild.equals( panelToRemove ) ) {
mapPanelDefinitionToPresenter.remove( southChild );
removePanel( panelToRemove,
panelToSearch,
Position.SOUTH );
} else {
removePanel( panelToRemove,
southChild );
}
}
if ( eastChild != null ) {
if ( eastChild.equals( panelToRemove ) ) {
mapPanelDefinitionToPresenter.remove( eastChild );
removePanel( panelToRemove,
panelToSearch,
Position.EAST );
} else {
removePanel( panelToRemove,
eastChild );
}
}
if ( westChild != null ) {
if ( westChild.equals( panelToRemove ) ) {
mapPanelDefinitionToPresenter.remove( westChild );
removePanel( panelToRemove,
panelToSearch,
Position.WEST );
} else {