-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add filtering stategies extension point and fixed constructors in Kot…
…lin-as-Java
- Loading branch information
1 parent
ec63795
commit 96701ae
Showing
11 changed files
with
139 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
.../base/src/main/kotlin/translators/documentables/DefaultDocumentableFilteringStrategies.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.jetbrains.dokka.base.translators.documentables | ||
|
||
import org.jetbrains.dokka.model.DFunction | ||
import org.jetbrains.dokka.model.PrimaryConstructorExtra | ||
|
||
object DefaultDocumentableFilteringStrategies : DocumentablesFilteringStrategies { | ||
override fun shouldConstructorBeInPage(constructor: DFunction): Boolean = | ||
constructor.extra[PrimaryConstructorExtra] == null || constructor.documentation.isNotEmpty() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
plugins/base/src/main/kotlin/translators/documentables/DocumentablesFilteringStrategies.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.jetbrains.dokka.base.translators.documentables | ||
|
||
import org.jetbrains.dokka.model.DFunction | ||
|
||
interface DocumentablesFilteringStrategies { | ||
fun shouldConstructorBeInPage(constructor: DFunction): Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableFilteringStrategies.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.jetbrains.dokka.kotlinAsJava.translators | ||
|
||
import org.jetbrains.dokka.base.translators.documentables.DocumentablesFilteringStrategies | ||
import org.jetbrains.dokka.model.DFunction | ||
|
||
object KotlinAsJavaDocumentableFilteringStrategies : DocumentablesFilteringStrategies { | ||
override fun shouldConstructorBeInPage(constructor: DFunction) = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters