stubs: more logging
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 12 Aug 2020 11:23:11 +0000 (14:23 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Wed, 12 Aug 2020 11:40:35 +0000 (11:40 +0000)
GitOrigin-RevId: 2a79371d38e1834157c521772b1b8f4222ed314c

platform/lang-impl/src/com/intellij/psi/stubs/StubUpdatingIndex.java

index 43870f62569231f3417fc63b3004ae0d26b0a56e..bb7c9718e499fb22aa917c993cf6174b9a767bfd 100644 (file)
@@ -45,10 +45,7 @@ import org.jetbrains.annotations.Nullable;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Stream;
 
 public final class StubUpdatingIndex extends SingleEntryFileBasedIndexExtension<SerializedStubTree>
@@ -141,6 +138,18 @@ public final class StubUpdatingIndex extends SingleEntryFileBasedIndexExtension<
         return EnumeratorStringDescriptor.INSTANCE;
       }
 
+      @Override
+      protected @Nullable SerializedStubTree computeValue(@NotNull FileContent inputData) {
+        StubBuilderType subIndexerType = calculateSubIndexer(inputData);
+        if (subIndexerType == null) {
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("Stub builder not found for " + inputData.getFile() + ", " + calculateIndexingStamp(inputData));
+          }
+          return null;
+        }
+        return computeValue(inputData, Objects.requireNonNull(subIndexerType));
+      }
+
       @Override
       @Nullable
       protected SerializedStubTree computeValue(@NotNull final FileContent inputData, @NotNull StubBuilderType type) {