private class CreateSwimlaneSelectionListener extends SelectionAdapter {
@Override
public void widgetSelected(SelectionEvent e) {
UpdateSwimlaneNameDialog dialog = new UpdateSwimlaneNameDialog(getDefinition(), true);
if (dialog.open() == IDialogConstants.OK_ID) {
Swimlane newSwimlane = JpdlVersionRegistry.getElementTypeDefinition(getDefinition().getJpdlVersion(), "swimlane").createElement();
newSwimlane.setParent(getDefinition());
newSwimlane.setName(dialog.getName());
newSwimlane.setDelegationClassName(Swimlane.DELEGATION_CLASS_NAME);
getDefinition().addSwimlane(newSwimlane);
viewer.setSelection(new StructuredSelection(newSwimlane));
}
}