void () { int i = getSelectedIndex(); FileSetDescriptor selectedDescriptor = i >= 0 ? myModel.get(i) : null; if (selectedDescriptor instanceof NamedScopeDescriptor) { ensureScopeExists((NamedScopeDescriptor)selectedDescriptor); editScope(selectedDescriptor.getName()); } else { editScope(null); } }