sectionClient.setLayout(sectionLayout);
HyperlinkGroup generalHyperLinkGroup = new HyperlinkGroup(sectionClient.getDisplay());
_linkCreateWebApp = new ImageHyperlink(sectionClient, SWT.NONE);
_linkCreateWebApp.setText("Create new web application");
_linkCreateWebApp.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_DESIGN_ADD));
_linkCreateWebApp.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
try {
WorkbenchUtils.openWizard(WGADesignerPlugin.getDefault().getWorkbench(), ResourceIDs.WIZARD_NEW_WGA_DESIGN, new SingleStructuredSelection(_model.getWgaRuntime().getProject()));
} catch (CoreException e1) {
WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open wizard 'New WGADesign'", e1);
}
}
});
generalHyperLinkGroup.add(_linkCreateWebApp);
filler = new Label(sectionClient, SWT.NONE);
_tblWebApplications = new EditableTableControl<WebApplication>(sectionClient, SWT.NONE,SWT.BORDER|SWT.FULL_SELECTION) {
@Override
protected boolean isButtonAreaNeeded() {
return false;
}
};
GridData tblGridData = new GridData(GridData.FILL_BOTH);
tblGridData.minimumHeight = 200;
tblGridData.verticalSpan = 5;
_tblWebApplications.setLayoutData(tblGridData);
String[] columnNames = new String[] { "Key", "Title", "Domain", "Design" };
_tblWebApplications.init(columnNames, _webAppModel);
Composite tableActionsContainer = new Composite(sectionClient, SWT.NONE);
tableActionsContainer.setLayout(new GridLayout(1, false));
tableActionsContainer.setLayoutData(new GridData(SWT.BEGINNING));
GridData linkGridData = new GridData(SWT.BEGINNING);
linkGridData.verticalAlignment = SWT.TOP;
Label lblOpenIn = new Label(tableActionsContainer, SWT.NONE);
lblOpenIn.setLayoutData(GridDataFactory.copyData(linkGridData));
lblOpenIn.setText("open selected web application in ...");
Hyperlink openInBrowser = new Hyperlink(tableActionsContainer, SWT.NONE);
openInBrowser.setLayoutData(GridDataFactory.copyData(linkGridData));
openInBrowser.setText("Browser");
openInBrowser.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
handleOpenInBrowser();
}
});
Hyperlink openInDesignEditor = new Hyperlink(tableActionsContainer, SWT.NONE);
openInDesignEditor.setLayoutData(GridDataFactory.copyData(linkGridData));
openInDesignEditor.setText("Design Editor");
openInDesignEditor.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
handleOpenInDesignEditor();
}
});
Hyperlink openInContentManager = new Hyperlink(tableActionsContainer, SWT.NONE);
openInContentManager.setLayoutData(GridDataFactory.copyData(linkGridData));
openInContentManager.setText("Content Manager");
openInContentManager.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
handleOpenInContentManager();
}
});
Hyperlink openInAdminClient = new Hyperlink(tableActionsContainer, SWT.NONE);
openInAdminClient.setLayoutData(GridDataFactory.copyData(linkGridData));
openInAdminClient.setText("Admin Client");
openInAdminClient.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
handleOpenInAdminClient();
}
});
generalHyperLinkGroup.add(openInBrowser);
generalHyperLinkGroup.add(openInDesignEditor);
generalHyperLinkGroup.add(openInContentManager);
generalHyperLinkGroup.add(openInAdminClient);
Label seperator = new Label(tableActionsContainer, SWT.SEPARATOR | SWT.HORIZONTAL);
seperator.setLayoutData(new GridData(SWT.FILL));
ImageHyperlink exportWebApplication = new ImageHyperlink(tableActionsContainer, SWT.NONE);
exportWebApplication.setText("Export web application");
exportWebApplication.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
handleExportWebApplication();
}
});
exportWebApplication.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_EXPORT_WGA_DESIGN));
generalHyperLinkGroup.add(exportWebApplication);
/*
Menu webApplicationsPopup = new Menu(_tblWebApplications.getTable());
_tblWebApplications.getTable().setMenu(webApplicationsPopup);