void (ListSelectionEvent e) { final int selIndex = myMacrosList.getSelectedIndex(); if (selIndex == -1) { ((DefaultListModel<ActionMacro.ActionDescriptor>)myMacroActionsList.getModel()).removeAllElements(); } else { initActionList(myMacrosModel.getElementAt(selIndex)); } }