Search in sources :

Example 1 with WorkspaceMainPart

use of bndtools.editor.workspace.WorkspaceMainPart 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, ExpandableComposite.TITLE_BAR | ExpandableComposite.EXPANDED | Section.DESCRIPTION);
    managedForm.addPart(linksPart);
    PluginPathPart pluginPathPart = new PluginPathPart(body, tk, ExpandableComposite.TITLE_BAR | ExpandableComposite.EXPANDED | Section.DESCRIPTION | ExpandableComposite.TWISTIE);
    managedForm.addPart(pluginPathPart);
    pluginsPart = new PluginsPart(body, tk, ExpandableComposite.TITLE_BAR | ExpandableComposite.EXPANDED | Section.DESCRIPTION | ExpandableComposite.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) ExpandableComposite(org.eclipse.ui.forms.widgets.ExpandableComposite) ScrolledForm(org.eclipse.ui.forms.widgets.ScrolledForm) PluginPathPart(bndtools.editor.workspace.PluginPathPart) WorkspaceMainPart(bndtools.editor.workspace.WorkspaceMainPart)

Aggregations

PluginPathPart (bndtools.editor.workspace.PluginPathPart)1 PluginsPart (bndtools.editor.workspace.PluginsPart)1 WorkspaceMainPart (bndtools.editor.workspace.WorkspaceMainPart)1 MessageHyperlinkAdapter (bndtools.utils.MessageHyperlinkAdapter)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 ExpandableComposite (org.eclipse.ui.forms.widgets.ExpandableComposite)1 FormToolkit (org.eclipse.ui.forms.widgets.FormToolkit)1 ScrolledForm (org.eclipse.ui.forms.widgets.ScrolledForm)1