Added error message for missing python-skeletons diagnostics (PY-10411)

This commit is contained in:
Andrey Vlasovskikh
2013-12-23 16:14:25 +04:00
parent 3a3bbfff65
commit 9e8ef9207c
@@ -17,6 +17,7 @@ package com.jetbrains.python.codeInsight.userSkeletons;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.Sdk;
@@ -53,7 +54,10 @@ import java.util.List;
*/
public class PyUserSkeletonsUtil {
public static final String USER_SKELETONS_DIR = "python-skeletons";
private static final Logger LOG = Logger.getInstance("#com.jetbrains.python.codeInsight.userSkeletons.PyUserSkeletonsUtil");
@Nullable private static VirtualFile ourUserSkeletonsDirectory;
private static boolean ourNoSkeletonsErrorReported = false;
@NotNull
private static List<String> getPossibleUserSkeletonsPaths() {
@@ -75,6 +79,10 @@ public class PyUserSkeletonsUtil {
}
}
}
if (!ourNoSkeletonsErrorReported && ourUserSkeletonsDirectory == null) {
ourNoSkeletonsErrorReported = true;
LOG.error("python-skeletons directory not found in paths: " + getPossibleUserSkeletonsPaths());
}
return ourUserSkeletonsDirectory;
}