rewrite class file stub builder as full decompiler (workaround SOE)
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Thu, 13 Aug 2020 15:12:38 +0000 (18:12 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Thu, 13 Aug 2020 15:12:38 +0000 (15:12 +0000)
GitOrigin-RevId: e96bcb92c1cdb90e108e2b3073072f70aacb2260

java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClassFileDecompiler.java

index 1faf4f811133d14047c1a79787b322a2d0f26f12..8ce4d332dacab3e4b8887d1e2ee7b8e01e647e21 100644 (file)
@@ -15,6 +15,10 @@ public class ClassFileDecompiler implements BinaryFileDecompiler {
   @Override
   public @NotNull CharSequence decompile(@NotNull VirtualFile file) {
     ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.getInstance().find(file, ClassFileDecompilers.Decompiler.class);
   @Override
   public @NotNull CharSequence decompile(@NotNull VirtualFile file) {
     ClassFileDecompilers.Decompiler decompiler = ClassFileDecompilers.getInstance().find(file, ClassFileDecompilers.Decompiler.class);
+    if (decompiler instanceof ClsDecompilerImpl) {
+      return ClsFileImpl.decompile(file);
+    }
+
     if (decompiler instanceof ClassFileDecompilers.Full) {
       PsiManager manager = PsiManager.getInstance(DefaultProjectFactory.getInstance().getDefaultProject());
       return ((ClassFileDecompilers.Full)decompiler).createFileViewProvider(file, manager, true).getContents();
     if (decompiler instanceof ClassFileDecompilers.Full) {
       PsiManager manager = PsiManager.getInstance(DefaultProjectFactory.getInstance().getDefaultProject());
       return ((ClassFileDecompilers.Full)decompiler).createFileViewProvider(file, manager, true).getContents();