MyNode[] () { ProjectItem item = (ProjectItem)projectCombobox.getSelectedItem(); if(item == null) return new MyNode[]{}; if (item.myProjectSettings.getModules().isEmpty() || item.myProjectSettings.getModules().size() == 1) { final TaskActivationState tasksActivation = myStateProvider.getTasksActivation(myProjectSystemId, item.myProjectSettings.getExternalProjectPath()); return buildProjectPhasesNodes(item.myProjectSettings.getExternalProjectPath(), tasksActivation, this); } else { return buildProjectsNodes(item.myProjectSettings, myStateProvider, this); } }