CharSequence (@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.Light) { try { return ((ClassFileDecompilers.Light)decompiler).getText(file); } catch (ClassFileDecompilers.Light.CannotDecompileException e) { LOG.warn("decompiler: " + decompiler.getClass(), e); return ClsFileImpl.decompile(file); } } throw new IllegalStateException(decompiler.getClass().getName() + " should be on of " + ClassFileDecompilers.Full.class.getName() + " or " + ClassFileDecompilers.Light.class.getName()); }