@Override
protected void createFormContent(IManagedForm managedForm) {
ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
toolkit.decorateFormHeading(form.getForm());
WidgetFactory factory = new WidgetFactory(toolkit);
form.setText(PAGE_TITLE);
ColumnLayout layout = new ColumnLayout();
layout.maxNumColumns = 2;
form.getBody().setLayout(layout);
// general section
Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
section.setText("General");
Composite sectionClient = toolkit.createComposite(section);
section.setClient(sectionClient);
GridLayout sectionLayout = new GridLayout();
GridData fillHSpan = new GridData(GridData.FILL_HORIZONTAL);
fillHSpan.horizontalSpan = 2;
GridData comboLayout = new GridData(GridData.GRAB_HORIZONTAL);
comboLayout.minimumWidth = 150;
sectionLayout.numColumns = 3;
sectionClient.setLayout(sectionLayout);
_comboWGADistribution = factory.createCombo(sectionClient, "WGA Distribution:", "wgaDeployment");
_comboWGADistribution.setLayoutData(comboLayout);
// _btnConfigureWGAInstallations = new Button(sectionClient, SWT.NONE);
// _btnConfigureWGAInstallations.setText("Configure distributions ...");
// _btnConfigureWGAInstallations.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
// public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
// handleConfigureWGADistributions();
// }
// });
HyperlinkGroup group = new HyperlinkGroup(sectionClient.getDisplay());
ImageHyperlink linkConfigureDistributions = new ImageHyperlink(sectionClient, SWT.None);
linkConfigureDistributions.setText("Configure distributions ...");
linkConfigureDistributions.addHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
handleConfigureWGADistributions();
}
});
group.add(linkConfigureDistributions);
//factory.createCheckBox(sectionClient, "Output TML-Warnings on server console:", "enabled", "outputTMLWarningsOnConsole");
//factory.addFiller(sectionClient);
// factory.createCheckBox(sectionClient, "TML-Script debugger:", "enabled", "tmlScriptDebuggerEnabled");
// factory.addFiller(sectionClient);
//
// factory.createCheckBox(sectionClient, "Java debugging:", "enabled", "javaDebuggerEnabled");
// factory.addFiller(sectionClient);
group = new HyperlinkGroup(sectionClient.getDisplay());
ImageHyperlink linkConfigureGlobalRuntimePreferences = new ImageHyperlink(sectionClient, SWT.None);
linkConfigureGlobalRuntimePreferences.setText("Configure global runtime settings ...");
linkConfigureGlobalRuntimePreferences.addHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
openGeneralPreferencesPage();
}
});
group.add(linkConfigureGlobalRuntimePreferences);
// libraries section
section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.COMPACT);
section.setText("Tomcat libraries");
sectionClient = toolkit.createComposite(section);
section.setClient(sectionClient);
sectionLayout = new GridLayout();
sectionLayout.numColumns = 2;
sectionClient.setLayout(sectionLayout);
GridData fillBoth = new GridData(GridData.FILL_BOTH);
fillBoth.minimumHeight = 100;
fillBoth.verticalSpan = 2;
_lstTomcatLibraries = new List(sectionClient, SWT.BORDER|SWT.MULTI);
_lstTomcatLibraries.setLayoutData(fillBoth);
_lstTomcatLibraries.setItems(_model.getTomcatLibraryNames());
_btnAddTomcatLibrary = toolkit.createButton(sectionClient, "add...", SWT.PUSH);
_btnAddTomcatLibrary.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
handleAddTomcatLibrary();
}
});
GridData btnLayout = new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_FILL, false, false);
_btnAddTomcatLibrary.setLayoutData(btnLayout);
_btnRemoveTomcatLibrary = toolkit.createButton(sectionClient, "remove...", SWT.PUSH);
_btnRemoveTomcatLibrary.setLayoutData(btnLayout);
_btnRemoveTomcatLibrary.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
handleRemoveTomcatLibrary();
}
});
// java section
section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
section.setText("Java");
sectionClient = toolkit.createComposite(section);
section.setClient(sectionClient);
sectionLayout = new GridLayout();