public void createPart(Composite parent) {
init(parent.getDisplay());
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
form = toolkit.createScrolledForm(parent);
form.setLayoutData(new GridData(GridData.FILL_BOTH));
FormColors colors = toolkit.getColors();
/*
colors.initializeSectionToolBarColors();
Color gbg = colors.getColor(FormColors.TB_GBG);
Color bg = colors.getBackground();
form.getForm().setTextBackground(new Color[]{bg, gbg}, new int [] {100}, true);
form.getForm().setSeparatorColor(colors.getColor(FormColors.TB_BORDER));
form.getForm().setSeparatorVisible(true);
*/
toolkit.decorateFormHeading(form.getForm());
mform = new ManagedForm(toolkit, form);
GridLayout glayout = new GridLayout();
glayout.marginHeight = 0;
glayout.marginWidth = 0;
form.getBody().setLayout(glayout);
final SashForm sash = new SashForm(form.getBody(), SWT.NULL);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = 10;
gd.heightHint = 10;
sash.setLayoutData(gd);
sash.addControlListener(new ControlAdapter() {
public void controlResized(ControlEvent e) {
Point size = sash.getSize();
if (size.x>size.y)
sash.setOrientation(SWT.HORIZONTAL);
else
sash.setOrientation(SWT.VERTICAL);
updateSashPanelMargins(sash);
}
});
sash.setBackground(colors.getColor(IFormColors.TB_BG));
Composite explorerPanel = new Composite(sash, SWT.NULL);
explorerPanel.setBackground(colors.getColor(IFormColors.TB_BORDER));
GridLayout playout = new GridLayout();
playout.marginWidth = 0;
playout.marginTop = 2;
playout.marginBottom = 0;
explorerPanel.setLayout(playout);
toolkit.adapt(explorerPanel);
explorerContainer = new PageBook(explorerPanel, SWT.NULL);
explorerContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite editorPanel = new Composite(sash, SWT.NULL);
playout = new GridLayout();
playout.marginWidth = 0;
playout.marginHeight = 0;
editorPanel.setLayout(playout);
editorPanel.setBackground(colors.getColor(IFormColors.TB_BORDER));
taskEditorContainer = new PageBook(editorPanel, SWT.NULL);
toolkit.adapt(taskEditorContainer);
taskEditorContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
}