Search in sources :

Example 11 with ScrolledForm

use of org.eclipse.ui.forms.widgets.ScrolledForm in project bndtools by bndtools.

the class WorkspacePage method createFormContent.

@Override
protected void createFormContent(IManagedForm managedForm) {
    managedForm.setInput(model);
    FormToolkit tk = managedForm.getToolkit();
    ScrolledForm form = managedForm.getForm();
    form.setText("Workspace Config");
    tk.decorateFormHeading(form.getForm());
    form.getForm().addMessageHyperlinkListener(new MessageHyperlinkAdapter(getEditor()));
    // Create controls
    Composite body = form.getBody();
    WorkspaceMainPart linksPart = new WorkspaceMainPart(mainBuildFile, body, tk, Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION);
    managedForm.addPart(linksPart);
    PluginPathPart pluginPathPart = new PluginPathPart(body, tk, Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION | Section.TWISTIE);
    managedForm.addPart(pluginPathPart);
    pluginsPart = new PluginsPart(body, tk, Section.TITLE_BAR | Section.EXPANDED | Section.DESCRIPTION | Section.TWISTIE);
    managedForm.addPart(pluginsPart);
    // Layout
    GridLayout layout = new GridLayout(1, false);
    body.setLayout(layout);
    linksPart.getSection().setLayoutData(PageLayoutUtils.createCollapsed());
    pluginPathPart.getSection().setLayoutData(PageLayoutUtils.createExpanded());
    pluginPathPart.getSection().addExpansionListener(new ResizeExpansionAdapter(pluginPathPart.getSection()));
    pluginsPart.getSection().setLayoutData(PageLayoutUtils.createExpanded());
    pluginsPart.getSection().addExpansionListener(new ResizeExpansionAdapter(pluginsPart.getSection()));
}
Also used : PluginsPart(bndtools.editor.workspace.PluginsPart) GridLayout(org.eclipse.swt.layout.GridLayout) MessageHyperlinkAdapter(bndtools.utils.MessageHyperlinkAdapter) FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) Composite(org.eclipse.swt.widgets.Composite) ScrolledForm(org.eclipse.ui.forms.widgets.ScrolledForm) PluginPathPart(bndtools.editor.workspace.PluginPathPart) WorkspaceMainPart(bndtools.editor.workspace.WorkspaceMainPart)

Aggregations

ScrolledForm (org.eclipse.ui.forms.widgets.ScrolledForm)11 GridLayout (org.eclipse.swt.layout.GridLayout)7 Composite (org.eclipse.swt.widgets.Composite)7 FormToolkit (org.eclipse.ui.forms.widgets.FormToolkit)7 MessageHyperlinkAdapter (bndtools.utils.MessageHyperlinkAdapter)6 FillLayout (org.eclipse.swt.layout.FillLayout)6 MDSashForm (bndtools.editor.common.MDSashForm)5 GridData (org.eclipse.swt.layout.GridData)5 Workspace (aQute.bnd.build.Workspace)3 IManagedForm (org.eclipse.ui.forms.IManagedForm)2 Form (org.eclipse.ui.forms.widgets.Form)2 Promise (org.osgi.util.promise.Promise)2 Project (aQute.bnd.build.Project)1 SaneDetailsPart (bndtools.editor.common.SaneDetailsPart)1 DescriptionBundlePart (bndtools.editor.contents.DescriptionBundlePart)1 DescriptionDeveloperPart (bndtools.editor.contents.DescriptionDeveloperPart)1 DescriptionRightsPart (bndtools.editor.contents.DescriptionRightsPart)1 DescriptionVendorPart (bndtools.editor.contents.DescriptionVendorPart)1 TestSuitesPart (bndtools.editor.contents.TestSuitesPart)1 IDocumentWrapper (bndtools.editor.model.IDocumentWrapper)1