/** * Displays new dialog. * * @param sourceEstimationList the list of estimated project types for display in popup window * @param callback the callback that call after user interact */ public void showDialog( @Nullable List<SourceEstimation> sourceEstimationList, @NotNull ProjectProblemDialogCallback callback) { this.callback = callback; if (sourceEstimationList == null || sourceEstimationList.isEmpty()) { estimatedTypes = null; view.showDialog(null); return; } estimatedTypes = new ArrayList<>(sourceEstimationList.size()); List<String> estimatedTypeNames = new ArrayList<>(sourceEstimationList.size()); for (SourceEstimation estimatedType : sourceEstimationList) { ProjectTypeDefinition projectType = projectTypeRegistry.getProjectType(estimatedType.getType()); if (estimatedType.isPrimaryable() && projectType != null) { this.estimatedTypes.add(estimatedType); estimatedTypeNames.add(projectType.getDisplayName()); } } view.showDialog(estimatedTypeNames); }