addButton.addMouseListener(new MouseListener(){
public void mouseDoubleClick(MouseEvent e) {}
public void mouseDown(MouseEvent e) {
FrameworkEditDialog fed = new FrameworkEditDialog(getShell());
fed.open();
}
public void mouseUp(MouseEvent e) {}
});
// A button for editing the current selection.
editButton = new Button(buttonBar, SWT.PUSH);
gridData = new GridData();
widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
editButton.setText("Edit Framework"); //$NON-NLS-1$
gridData.widthHint = Math.max(widthHint, editButton.computeSize(
SWT.DEFAULT, SWT.DEFAULT, true).x) + 5;
editButton.setLayoutData(gridData);
editButton.addMouseListener(new MouseListener(){
public void mouseDoubleClick(MouseEvent e) {}
public void mouseDown(MouseEvent e) {
//Get the selection
Object data = tableFrameworks.getSelection()[0].getData();
if (data instanceof Element) {
Element fwxElement = (Element) data;
FrameworkEditDialog fed = new FrameworkEditDialog(getShell(), fwxElement);
fed.open();
}
}