private void buildSize( final PanelDefinition panel ) {
if ( panel.getParts().isEmpty() ) {
return;
}
for ( final PartDefinition partDefinition : panel.getParts() ) {
final Activity currentActivity = nativePerspective.getActivityManager().getActivity( partDefinition.getPlace() );
if ( currentActivity instanceof WorkbenchActivity ) {
final Integer width = ( (WorkbenchActivity) currentActivity ).preferredWidth();
final Integer height = ( (WorkbenchActivity) currentActivity ).preferredHeight();
if ( width != null || height != null ) {
panel.setHeight( height );