コード例 #1
0
  @Nullable
  private static PsiJavaFileStub createStub(@NotNull VirtualFile file) {
    if (file.getFileType() != JavaClassFileType.INSTANCE) return null;

    try {
      return ClsFileImpl.buildFileStub(file, file.contentsToByteArray());
    } catch (ClsFormatException e) {
      LOG.debug(e);
    } catch (IOException e) {
      LOG.debug(e);
    }
    LOG.error("Failed to build java cls class for " + file.getCanonicalPath());
    return null;
  }