void () { final PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(); if (!propertiesComponent.isTrueValue("run.configuration.delete.ad")) { propertiesComponent.setValue("run.configuration.delete.ad", Boolean.toString(true)); } final int index = getSelectedIndex(); if (index == -1) { return; } final Object o = getListModel().get(index); if (o instanceof ItemWrapper && ((ItemWrapper<?>)o).canBeDeleted()) { RunnerAndConfigurationSettings runConfig = (RunnerAndConfigurationSettings)((ItemWrapper<?>)o).getValue(); deleteConfiguration(myProject, runConfig, ChooseRunConfigurationPopup.this.myPopup); getListModel().deleteItem(o); final List<Object> values = getListStep().getValues(); values.remove(o); if (index < values.size()) { onChildSelectedFor(values.get(index)); } else if (index - 1 >= 0) { onChildSelectedFor(values.get(index - 1)); } } }