ProjectImportProvider () { final ProjectImportProvider provider; if (myCreateFromSources.isSelected()) { provider = myFromSourcesProvider; } else { provider = (ProjectImportProvider)myList.getSelectedValue(); } return provider; }