From 9e8ef9207c6232c1ef573e511025828e21176517 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Mon, 23 Dec 2013 16:14:25 +0400 Subject: [PATCH] Added error message for missing python-skeletons diagnostics (PY-10411) --- .../codeInsight/userSkeletons/PyUserSkeletonsUtil.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsUtil.java b/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsUtil.java index da0ad54784d0..2d0fd8d42868 100644 --- a/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsUtil.java +++ b/python/src/com/jetbrains/python/codeInsight/userSkeletons/PyUserSkeletonsUtil.java @@ -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 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; }