Skip to content

Commit

Permalink
Extract analysis into separate modules
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnatBeresnev committed May 25, 2023
1 parent 1acfb60 commit a65f23c
Show file tree
Hide file tree
Showing 190 changed files with 5,265 additions and 3,650 deletions.
241 changes: 241 additions & 0 deletions analysis/java-analysis/api/java-analysis.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
public final class org/jetbrains/dokka/analysis/java/AuthorJavadocTag : org/jetbrains/dokka/analysis/java/JavadocTag {
public static final field INSTANCE Lorg/jetbrains/dokka/analysis/java/AuthorJavadocTag;
}

public abstract interface class org/jetbrains/dokka/analysis/java/BreakingAbstractionKotlinLightMethodChecker {
public abstract fun isLightAnnotation (Lcom/intellij/psi/PsiAnnotation;)Z
public abstract fun isLightAnnotationAttribute (Lcom/intellij/lang/jvm/annotation/JvmAnnotationAttribute;)Z
}

public final class org/jetbrains/dokka/analysis/java/DefaultPsiToDocumentableTranslator : org/jetbrains/dokka/transformers/sources/AsyncSourceToDocumentableTranslator {
public fun <init> ()V
public fun invoke (Lorg/jetbrains/dokka/DokkaConfiguration$DokkaSourceSet;Lorg/jetbrains/dokka/plugability/DokkaContext;)Lorg/jetbrains/dokka/model/DModule;
public fun invokeSuspending (Lorg/jetbrains/dokka/DokkaConfiguration$DokkaSourceSet;Lorg/jetbrains/dokka/plugability/DokkaContext;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public final class org/jetbrains/dokka/analysis/java/DefaultPsiToDocumentableTranslatorKt {
public static final fun getVisibility (Lcom/intellij/psi/PsiModifierListOwner;)Lorg/jetbrains/dokka/model/JavaVisibility;
}

public final class org/jetbrains/dokka/analysis/java/DeprecatedJavadocTag : org/jetbrains/dokka/analysis/java/JavadocTag {
public static final field INSTANCE Lorg/jetbrains/dokka/analysis/java/DeprecatedJavadocTag;
}

public final class org/jetbrains/dokka/analysis/java/DescriptionJavadocTag : org/jetbrains/dokka/analysis/java/JavadocTag {
public static final field INSTANCE Lorg/jetbrains/dokka/analysis/java/DescriptionJavadocTag;
}

public abstract interface class org/jetbrains/dokka/analysis/java/DocComment {
public abstract fun hasTag (Lorg/jetbrains/dokka/analysis/java/JavadocTag;)Z
public abstract fun resolveTag (Lorg/jetbrains/dokka/analysis/java/JavadocTag;)Ljava/util/List;
}

public abstract interface class org/jetbrains/dokka/analysis/java/DocCommentCreator {
public abstract fun create (Lcom/intellij/psi/PsiNamedElement;)Lorg/jetbrains/dokka/analysis/java/DocComment;
}

public final class org/jetbrains/dokka/analysis/java/DocCommentFactory {
public fun <init> (Ljava/util/List;)V
public final fun fromElement (Lcom/intellij/psi/PsiNamedElement;)Lorg/jetbrains/dokka/analysis/java/DocComment;
}

public final class org/jetbrains/dokka/analysis/java/DocCommentFinder {
public fun <init> (Lorg/jetbrains/dokka/utilities/DokkaLogger;Lorg/jetbrains/dokka/analysis/java/DocCommentFactory;)V
public final fun findClosestToElement (Lcom/intellij/psi/PsiNamedElement;)Lorg/jetbrains/dokka/analysis/java/DocComment;
}

public abstract interface class org/jetbrains/dokka/analysis/java/DocCommentParser {
public abstract fun canParse (Lorg/jetbrains/dokka/analysis/java/DocComment;)Z
public abstract fun parse (Lorg/jetbrains/dokka/analysis/java/DocComment;Lcom/intellij/psi/PsiNamedElement;)Lorg/jetbrains/dokka/model/doc/DocumentationNode;
}

public abstract interface class org/jetbrains/dokka/analysis/java/DocumentationContent {
public abstract fun getTag ()Lorg/jetbrains/dokka/analysis/java/JavadocTag;
public abstract fun resolveSiblings ()Ljava/util/List;
}

public final class org/jetbrains/dokka/analysis/java/DokkaPsiParser {
public fun <init> (Lorg/jetbrains/dokka/DokkaConfiguration$DokkaSourceSet;Lcom/intellij/openapi/project/Project;Lorg/jetbrains/dokka/utilities/DokkaLogger;Lorg/jetbrains/dokka/analysis/java/parsers/JavadocParser;Lorg/jetbrains/dokka/analysis/java/parsers/JavaPsiDocCommentParser;Lorg/jetbrains/dokka/analysis/java/BreakingAbstractionKotlinLightMethodChecker;)V
public final fun parsePackage (Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public final class org/jetbrains/dokka/analysis/java/ExceptionJavadocTag : org/jetbrains/dokka/analysis/java/ThrowingExceptionJavadocTag {
public static final field Companion Lorg/jetbrains/dokka/analysis/java/ExceptionJavadocTag$Companion;
public static final field name Ljava/lang/String;
public fun <init> (Ljava/lang/String;)V
}

public final class org/jetbrains/dokka/analysis/java/ExceptionJavadocTag$Companion {
}

public final class org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin : org/jetbrains/dokka/plugability/DokkaPlugin {
public fun <init> ()V
public final fun getDocCommentCreators ()Lorg/jetbrains/dokka/plugability/ExtensionPoint;
public final fun getDocCommentFinder ()Lorg/jetbrains/dokka/analysis/java/DocCommentFinder;
public final fun getDocCommentParsers ()Lorg/jetbrains/dokka/plugability/ExtensionPoint;
public final fun getInheritDocTagContentProviders ()Lorg/jetbrains/dokka/plugability/ExtensionPoint;
public final fun getKotlinLightMethodChecker ()Lorg/jetbrains/dokka/plugability/ExtensionPoint;
public final fun getProjectProvider ()Lorg/jetbrains/dokka/plugability/ExtensionPoint;
public final fun getPsiToDocumentableTranslator ()Lorg/jetbrains/dokka/plugability/Extension;
public final fun getSourceRootsExtractor ()Lorg/jetbrains/dokka/plugability/ExtensionPoint;
}

public final class org/jetbrains/dokka/analysis/java/JavaDocComment : org/jetbrains/dokka/analysis/java/DocComment {
public fun <init> (Lcom/intellij/psi/javadoc/PsiDocComment;)V
public fun equals (Ljava/lang/Object;)Z
public final fun getComment ()Lcom/intellij/psi/javadoc/PsiDocComment;
public fun hasTag (Lorg/jetbrains/dokka/analysis/java/JavadocTag;)Z
public fun hashCode ()I
public fun resolveTag (Lorg/jetbrains/dokka/analysis/java/JavadocTag;)Ljava/util/List;
}

public final class org/jetbrains/dokka/analysis/java/JavaDocCommentCreator : org/jetbrains/dokka/analysis/java/DocCommentCreator {
public fun <init> ()V
public fun create (Lcom/intellij/psi/PsiNamedElement;)Lorg/jetbrains/dokka/analysis/java/DocComment;
}

public abstract class org/jetbrains/dokka/analysis/java/JavadocTag {
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getName ()Ljava/lang/String;
}

public final class org/jetbrains/dokka/analysis/java/ParamJavadocTag : org/jetbrains/dokka/analysis/java/JavadocTag {
public static final field Companion Lorg/jetbrains/dokka/analysis/java/ParamJavadocTag$Companion;
public static final field name Ljava/lang/String;
public fun <init> (Lcom/intellij/psi/PsiMethod;Ljava/lang/String;I)V
public final fun getMethod ()Lcom/intellij/psi/PsiMethod;
public final fun getParamIndex ()I
public final fun getParamName ()Ljava/lang/String;
}

public final class org/jetbrains/dokka/analysis/java/ParamJavadocTag$Companion {
}

public abstract interface class org/jetbrains/dokka/analysis/java/ProjectProvider {
public abstract fun getProject (Lorg/jetbrains/dokka/DokkaConfiguration$DokkaSourceSet;Lorg/jetbrains/dokka/plugability/DokkaContext;)Lcom/intellij/openapi/project/Project;
}

public final class org/jetbrains/dokka/analysis/java/ReturnJavadocTag : org/jetbrains/dokka/analysis/java/JavadocTag {
public static final field INSTANCE Lorg/jetbrains/dokka/analysis/java/ReturnJavadocTag;
}

public final class org/jetbrains/dokka/analysis/java/SeeJavadocTag : org/jetbrains/dokka/analysis/java/JavadocTag {
public static final field Companion Lorg/jetbrains/dokka/analysis/java/SeeJavadocTag$Companion;
public static final field name Ljava/lang/String;
public fun <init> (Ljava/lang/String;)V
public final fun getQualifiedReference ()Ljava/lang/String;
}

public final class org/jetbrains/dokka/analysis/java/SeeJavadocTag$Companion {
}

public abstract interface class org/jetbrains/dokka/analysis/java/SourceRootsExtractor {
public abstract fun extract (Lorg/jetbrains/dokka/DokkaConfiguration$DokkaSourceSet;Lorg/jetbrains/dokka/plugability/DokkaContext;)Ljava/util/List;
}

public abstract class org/jetbrains/dokka/analysis/java/ThrowingExceptionJavadocTag : org/jetbrains/dokka/analysis/java/JavadocTag {
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getExceptionQualifiedName ()Ljava/lang/String;
}

public final class org/jetbrains/dokka/analysis/java/ThrowsJavadocTag : org/jetbrains/dokka/analysis/java/ThrowingExceptionJavadocTag {
public static final field Companion Lorg/jetbrains/dokka/analysis/java/ThrowsJavadocTag$Companion;
public static final field name Ljava/lang/String;
public fun <init> (Ljava/lang/String;)V
}

public final class org/jetbrains/dokka/analysis/java/ThrowsJavadocTag$Companion {
}

public final class org/jetbrains/dokka/analysis/java/doctag/DocTagParserContext {
public fun <init> ()V
public final fun getDocumentationNode (Ljava/lang/String;)Lorg/jetbrains/dokka/model/doc/DocumentationNode;
public final fun getDri (Ljava/lang/String;)Lorg/jetbrains/dokka/links/DRI;
public final fun store (Lorg/jetbrains/dokka/links/DRI;)Ljava/lang/String;
public final fun store (Lorg/jetbrains/dokka/model/doc/DocumentationNode;)Ljava/lang/String;
}

public abstract interface class org/jetbrains/dokka/analysis/java/doctag/InheritDocTagContentProvider {
public abstract fun canConvert (Lorg/jetbrains/dokka/analysis/java/DocumentationContent;)Z
public abstract fun convertToHtml (Lorg/jetbrains/dokka/analysis/java/DocumentationContent;Lorg/jetbrains/dokka/analysis/java/doctag/DocTagParserContext;)Ljava/lang/String;
}

public final class org/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext {
public fun <init> (Lcom/intellij/psi/javadoc/PsiDocComment;Lorg/jetbrains/dokka/analysis/java/JavadocTag;)V
public final fun component1 ()Lcom/intellij/psi/javadoc/PsiDocComment;
public final fun component2 ()Lorg/jetbrains/dokka/analysis/java/JavadocTag;
public final fun copy (Lcom/intellij/psi/javadoc/PsiDocComment;Lorg/jetbrains/dokka/analysis/java/JavadocTag;)Lorg/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext;
public static synthetic fun copy$default (Lorg/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext;Lcom/intellij/psi/javadoc/PsiDocComment;Lorg/jetbrains/dokka/analysis/java/JavadocTag;ILjava/lang/Object;)Lorg/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext;
public fun equals (Ljava/lang/Object;)Z
public final fun getComment ()Lcom/intellij/psi/javadoc/PsiDocComment;
public final fun getTag ()Lorg/jetbrains/dokka/analysis/java/JavadocTag;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract interface class org/jetbrains/dokka/analysis/java/parsers/JavaDocumentationParser {
public abstract fun parseDocumentation (Lcom/intellij/psi/PsiNamedElement;)Lorg/jetbrains/dokka/model/doc/DocumentationNode;
}

public final class org/jetbrains/dokka/analysis/java/parsers/JavaPsiDocCommentParser : org/jetbrains/dokka/analysis/java/DocCommentParser {
public fun <init> (Lorg/jetbrains/dokka/analysis/java/parsers/doctag/PsiDocTagParser;)V
public fun canParse (Lorg/jetbrains/dokka/analysis/java/DocComment;)Z
public fun parse (Lorg/jetbrains/dokka/analysis/java/DocComment;Lcom/intellij/psi/PsiNamedElement;)Lorg/jetbrains/dokka/model/doc/DocumentationNode;
}

public final class org/jetbrains/dokka/analysis/java/parsers/JavadocParser : org/jetbrains/dokka/analysis/java/parsers/JavaDocumentationParser {
public fun <init> (Ljava/util/List;Lorg/jetbrains/dokka/analysis/java/DocCommentFinder;)V
public fun parseDocumentation (Lcom/intellij/psi/PsiNamedElement;)Lorg/jetbrains/dokka/model/doc/DocumentationNode;
}

public final class org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagResolver {
public fun <init> (Lorg/jetbrains/dokka/analysis/java/DocCommentFactory;Lorg/jetbrains/dokka/analysis/java/DocCommentFinder;Ljava/util/List;)V
}

public final class org/jetbrains/dokka/analysis/java/parsers/doctag/PsiDocTagParser {
public fun <init> (Lorg/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagResolver;)V
public final fun parse (Ljava/lang/Iterable;Lorg/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext;)Ljava/util/List;
public final fun parseAsParagraph (Ljava/lang/Iterable;Lorg/jetbrains/dokka/analysis/java/parsers/CommentResolutionContext;)Ljava/util/List;
}

public final class org/jetbrains/dokka/analysis/java/util/PropertiesConventionUtilKt {
public static final fun propertyNameByGetMethodName (Ljava/lang/String;)Ljava/lang/String;
public static final fun propertyNamesBySetMethodName (Ljava/lang/String;)Ljava/util/List;
}

public final class org/jetbrains/dokka/analysis/java/util/PsiCommentsUtilsKt {
public static final fun defaultLabel (Lcom/intellij/psi/PsiElement;)Lcom/intellij/psi/PsiElement;
public static final fun isSharpToken (Lcom/intellij/psi/javadoc/PsiDocToken;)Z
public static final fun linkElement (Lcom/intellij/psi/javadoc/PsiDocTag;)Lcom/intellij/psi/PsiElement;
public static final fun referenceElement (Lcom/intellij/psi/javadoc/PsiDocTag;)Lcom/intellij/psi/PsiElement;
}

public final class org/jetbrains/dokka/analysis/java/util/PsiDocumentableSource : org/jetbrains/dokka/model/DocumentableSource {
public fun <init> (Lcom/intellij/psi/PsiNamedElement;)V
public fun getLineNumber ()Ljava/lang/Integer;
public fun getPath ()Ljava/lang/String;
public final fun getPsi ()Lcom/intellij/psi/PsiNamedElement;
}

public final class org/jetbrains/dokka/analysis/java/util/PsiUtilKt {
public static final fun from (Lorg/jetbrains/dokka/links/Callable$Companion;Lcom/intellij/psi/PsiField;)Lorg/jetbrains/dokka/links/Callable;
public static final fun from (Lorg/jetbrains/dokka/links/Callable$Companion;Lcom/intellij/psi/PsiMethod;)Lorg/jetbrains/dokka/links/Callable;
public static final fun from (Lorg/jetbrains/dokka/links/DRI$Companion;Lcom/intellij/psi/PsiElement;)Lorg/jetbrains/dokka/links/DRI;
public static final fun from (Lorg/jetbrains/dokka/links/DriTarget$Companion;Lcom/intellij/psi/PsiElement;)Lorg/jetbrains/dokka/links/DriTarget;
public static final fun getKotlinFqName (Lcom/intellij/psi/PsiElement;)Ljava/lang/String;
public static final fun getKotlinFqNameProp (Lcom/intellij/psi/PsiElement;)Ljava/lang/String;
public static final fun getNextSiblingIgnoringWhitespace (Lcom/intellij/psi/PsiElement;Z)Lcom/intellij/psi/PsiElement;
public static synthetic fun getNextSiblingIgnoringWhitespace$default (Lcom/intellij/psi/PsiElement;ZILjava/lang/Object;)Lcom/intellij/psi/PsiElement;
public static final fun getParentsWithSelf (Lcom/intellij/psi/PsiElement;)Lkotlin/sequences/Sequence;
public static final fun siblings (Lcom/intellij/psi/PsiElement;ZZ)Lkotlin/sequences/Sequence;
public static synthetic fun siblings$default (Lcom/intellij/psi/PsiElement;ZZILjava/lang/Object;)Lkotlin/sequences/Sequence;
}

public final class org/jetbrains/dokka/analysis/java/util/StdlibUtilKt {
public static final fun lowercase (Ljava/lang/String;)Ljava/lang/String;
public static final fun lowercaseChar (C)C
public static final fun replaceFirstChar (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/String;
public static final fun uppercase (Ljava/lang/String;)Ljava/lang/String;
public static final fun uppercaseChar (C)C
}

57 changes: 57 additions & 0 deletions analysis/java-analysis/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
plugins {
id("org.jetbrains.conventions.kotlin-jvm")
id("org.jetbrains.conventions.maven-publish")
}

repositories {
// Override the shared repositories defined in the root settings.gradle.kts
// These repositories are very specific and are not needed in other projects
mavenCentral()
maven("https://www.jetbrains.com/intellij-repository/releases")
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")

maven("https://www.jetbrains.com/intellij-repository/snapshots") {
mavenContent { snapshotsOnly() }
}
}

//val intellijCore: Configuration by configurations.creating
//
//fun intellijCoreAnalysis() = zipTree(intellijCore.singleFile).matching {
// include("intellij-core.jar")
//}
//
//val jpsStandalone: Configuration by configurations.creating
//
//fun jpsModel() = zipTree(jpsStandalone.singleFile).matching {
// include("jps-model.jar")
// include("aalto-xml-*.jar")
//}

dependencies {
// TODO [beresnev] change to compileOnly?
implementation(projects.core)

// TODO [beresnev] remove
implementation(libs.kotlinx.coroutines.core)

// TODO [beresnev] probably possible to get rid of
implementation(projects.analysis.markdown)

// TODO [beresnev] add a description for why this is needed
implementation(libs.jsoup)

// @Suppress("UnstableApiUsage")
// intellijCore(libs.jetbrainsIntelliJ.core)
// implementation(intellijCoreAnalysis())
//
// @Suppress("UnstableApiUsage")
// jpsStandalone(libs.jetbrainsIntelliJ.jpsStandalone)
// implementation(jpsModel())

val idea_version = "203.8084.24" // must match the version used in kotlin
implementation("com.jetbrains.intellij.java:java-psi-impl:$idea_version")
implementation("com.jetbrains.intellij.platform:util:$idea_version")
implementation("com.jetbrains.intellij.platform:util-rt:$idea_version")
implementation("com.jetbrains.intellij.platform:jps-model-impl:$idea_version")
}
Loading

0 comments on commit a65f23c

Please sign in to comment.