mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
PY-13328 Create New Project: warning about installing template packages is not shown
This commit is contained in:
@@ -19,6 +19,7 @@ import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.facet.ui.ValidationResult;
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.FileViewProvider;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.templateLanguages.TemplateLanguageFileViewProvider;
|
||||
@@ -38,7 +39,10 @@ public class PyTemplatesUtil {
|
||||
String templateBinding = null;
|
||||
@NonNls String language = templatesPanel.getTemplateLanguage();
|
||||
if (language != null) {
|
||||
String framework = StringUtil.trimEnd(prefix, '_');
|
||||
framework = StringUtil.trimEnd(framework, '-');
|
||||
String postfix = language.toLowerCase();
|
||||
if (framework.equals(postfix)) return ValidationResult.OK;
|
||||
if (language.equals(TemplatesService.JINJA2)) {
|
||||
postfix = "jinja";
|
||||
}
|
||||
@@ -50,7 +54,7 @@ public class PyTemplatesUtil {
|
||||
try {
|
||||
final PyPackage installedPackage = packageManager.findPackage(templateBinding, false);
|
||||
if (installedPackage == null) {
|
||||
return new ValidationResult(templateBinding + " will be installed on selected interpreter");
|
||||
return new ValidationResult(templateBinding + " will be installed on the selected interpreter");
|
||||
}
|
||||
}
|
||||
catch (ExecutionException ignored) {
|
||||
@@ -61,7 +65,7 @@ public class PyTemplatesUtil {
|
||||
try {
|
||||
final PyPackage installedPackage = packageManager.findPackage(language, false);
|
||||
if (installedPackage == null) {
|
||||
return new ValidationResult(language + " will be installed on selected interpreter");
|
||||
return new ValidationResult(language + " will be installed on the selected interpreter");
|
||||
}
|
||||
}
|
||||
catch (ExecutionException ignored) {
|
||||
|
||||
Reference in New Issue
Block a user