@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
final IWorkspace workspace = Activator.getDefault().getModel().getCurrentWorkspace();
if (workspace != null) {
IIdentityModel identityModel = workspace.getIdentityModel();
IdentityWizard wizard = new IdentityWizard();
IdentityWizardDialog dialog = new IdentityWizardDialog(HandlerUtil.getActiveWorkbenchWindow(event).getShell(), wizard);
if (dialog.open() == IDialogConstants.OK_ID) {
IIdentity identity = wizard.getIdentity();
identityModel.store(identity);
}
}
return null;
}