}
@Override
protected void createFormContent( final IManagedForm managedForm )
{
final FormEditorPagePart part = getPart();
final ScrolledForm form = managedForm.getForm();
final Composite body = form.getForm().getBody();
final Presentation presentation = new SwtPresentation( part, null, body.getShell() )
{
@Override
public void render()
{
body.setBackground( getPart().getSwtResourceCache().color( Color.WHITE ) );
body.setBackgroundMode( SWT.INHERIT_DEFAULT );
managedForm.getToolkit().decorateFormHeading( managedForm.getForm().getForm() );
body.setLayout( glayout( 2, 0, 0 ) );
for( final FormComponentPart child : part.getChildParts() )
{
final Presentation childPresentation = child.createPresentation( null, body );
childPresentation.render();
}
final ISapphireDocumentation doc = part.definition().getDocumentation().content();
if( doc != null )
{
ISapphireDocumentationDef docdef = null;
if( doc instanceof ISapphireDocumentationDef )
{
docdef = (ISapphireDocumentationDef) doc;
}
else
{
docdef = ( (ISapphireDocumentationRef) doc ).resolve();
}
if( docdef != null )
{
HelpSystem.setHelp( body, docdef );
}
}
final SapphireActionGroup actions = part.getActions( CONTEXT_EDITOR_PAGE );
final SapphireActionPresentationManager actionPresentationManager = new SapphireActionPresentationManager( this, actions );
final SapphireToolBarManagerActionPresentation actionPresentation = new SapphireToolBarManagerActionPresentation( actionPresentationManager );
actionPresentation.setToolBarManager( form.getToolBarManager() );
actionPresentation.render();
}