protected void createContents( final Composite parent )
{
final PropertyEditorPart part = part();
final Value<?> property = (Value<?>) part.property();
final SapphireToolBarActionPresentation toolBarActionsPresentation = new SapphireToolBarActionPresentation( getActionPresentationManager() );
toolBarActionsPresentation.addFilter( createFilterByActionId( ACTION_ASSIST ) );
toolBarActionsPresentation.addFilter( createFilterByActionId( ACTION_BROWSE ) );
final boolean isActionsToolBarNeeded = toolBarActionsPresentation.hasActions();
final Composite composite = createMainComposite( parent );
composite.setLayout( glspacing( glayout( ( isActionsToolBarNeeded ? 3 : 2 ), 0, 0 ), 2 ) );
final PropertyEditorAssistDecorator decorator = createDecorator( composite );
decorator.addEditorControl( composite );
decorator.control().setLayoutData( gdvalign( gd(), SWT.TOP ) );
final Combo combo = new Combo( composite, SWT.SINGLE | SWT.BORDER | ( this.style == PopUpListFieldStyle.STRICT ? SWT.READ_ONLY : SWT.NONE ) );
combo.setLayoutData( gdhfill() );
combo.setVisibleItemCount( 10 );
decorator.addEditorControl( combo, true );
addControl( combo );
this.combo = combo;
if( isActionsToolBarNeeded )
{
final ToolBar toolbar = new ToolBar( composite, SWT.FLAT | SWT.HORIZONTAL );
toolbar.setLayoutData( gdhindent( gdvfill(), 3 ) );
toolBarActionsPresentation.setToolBar( toolbar );
toolBarActionsPresentation.render();
addControl( toolbar );
decorator.addEditorControl( toolbar );
}
final PossibleValuesService possibleValuesService = property.service( PossibleValuesService.class );