}
@SuppressWarnings("unused")
private void onRestorePlaceEvent( @Observes RestorePlaceEvent event ) {
final PlaceRequest place = event.getPlace();
final PartDefinition partToRestore = getPartForPlace( place );
final PanelDefinition panelToRestore = partToRestore.getParentPanel();
final Integer height = panelToRestore.getHeight();
final Integer width = panelToRestore.getWidth();
final Integer minHeight = panelToRestore.getMinHeight();
final Integer minWidth = panelToRestore.getMinWidth();
partToRestore.setMinimized( false );
//Restore containing panel
if ( !mapPanelDefinitionToPresenter.containsKey( panelToRestore ) ) {
//TODO {manstis} Position needs to be looked up from model - will need "outer" panel feature :(
PanelDefinition targetPanel = findTargetPanel( panelToRestore,
root );
if ( targetPanel == null ) {
targetPanel = root;
}
addWorkbenchPanel( targetPanel,
panelToRestore,
panelToRestore.getPosition() );
}
//Restore part
final WorkbenchPartPresenter presenter = mapPartDefinitionToPresenter.get( partToRestore );
addWorkbenchPart( partToRestore.getPlace(),
partToRestore,
panelToRestore,
presenter.getMenus(),
new UIPart( presenter.getTitle(), presenter.getTitleDecoration(), presenter.getPartView() ) );
}