@Override
public void widgetSelected(SelectionEvent e) {
IFile sourceFile = getConfigEditor().getResourceFile();
Shell shell = getFormPage().getSite().getShell();
if (shell != null && !shell.isDisposed()) {
BeanWizardDialog dialog = BeanWizardDialog.createBeanWizardDialog(shell, sourceFile, false);
dialog.create();
dialog.setBlockOnOpen(true);
if (dialog.open() == Window.OK) {
IDOMElement element = dialog.getNewBean();
getViewer().setSelection(new StructuredSelection(element));
}
}
}
});