Skip to content

Generate compatible AST for Kotlin and Java #1100

Description

@tsantalis

RefactoringMiner supports the matching of Java code to Kotlin.
Migrating Java to Kotlin is a common scenario in IntelliJ and Android projects.

Case studies:
JetBrains/intellij-community@2f6c8c0
square/okhttp@34bb125

Image

The generated AST diff is not aesthetically pleasing, as currently the AST trees for Java and Kotlin are incompatible.

We need to generate a common AST representation when generating a diff between Java and Kotlin.

My idea is the implement a org.jetbrains.kotlin.psi.KtVisitor which generates a gumTree Tree in the same way that
org.refactoringminer.astDiff.visitors.JdtWithCommentsVisitor generates a gumTree Tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions