mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CCE fixed
This commit is contained in:
@@ -142,7 +142,7 @@ public class ProjectTemplateList extends JPanel {
|
||||
|
||||
void restoreSelection() {
|
||||
final String templateName = PropertiesComponent.getInstance().getValue(PROJECT_WIZARD_TEMPLATE);
|
||||
if (templateName != null) {
|
||||
if (templateName != null && myList.getModel() instanceof CollectionListModel) {
|
||||
List<ProjectTemplate> list = ((CollectionListModel<ProjectTemplate>)myList.getModel()).toList();
|
||||
ProjectTemplate template = ContainerUtil.find(list, new Condition<ProjectTemplate>() {
|
||||
@Override
|
||||
|
||||
@@ -143,10 +143,10 @@ public class ProjectTypeStep extends ModuleWizardStep implements Disposable, Act
|
||||
myProjectTypeList.setSelectedValue(group, true);
|
||||
}
|
||||
}
|
||||
myTemplatesList.restoreSelection();
|
||||
if (myProjectTypeList.getSelectedValue() == null) {
|
||||
myProjectTypeList.setSelectedIndex(0);
|
||||
}
|
||||
myTemplatesList.restoreSelection();
|
||||
}
|
||||
|
||||
private List<TemplatesGroup> fillTemplatesMap(WizardContext context) {
|
||||
|
||||
Reference in New Issue
Block a user