private SelectionListener createAddItemButtonSelectionListener() {
return new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
MacroItemSelectionDialog dialog = new MacroItemSelectionDialog(parentComposite.getShell());
if (dialog.open() == IDialogConstants.OK_ID) {
List<IRequestLogRecord> selectionList = dialog.getSelectionList();
for (Iterator<IRequestLogRecord> iter = selectionList.iterator(); iter.hasNext();) {
try {
macro.createMacroItem(iter.next());
} catch (URISyntaxException ex) {
ErrorDialog.displayError(getShell(), "An unexpected error occurred while processing the URI");