Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin changes are treated like Java code #122

Open
dimonchik0036 opened this issue Mar 13, 2023 · 6 comments
Open

Kotlin changes are treated like Java code #122

dimonchik0036 opened this issue Mar 13, 2023 · 6 comments
Assignees

Comments

@dimonchik0036
Copy link

The diff from the plugin:
image

The original diff:
image

Even an icon came from Java:
image

@dimonchik0036
Copy link
Author

Common question: is this plugin supposed to work with Kotlin code? I see very often suggestions for Java code, but this is the first time I see something for Kotlin

@onewhl
Copy link
Collaborator

onewhl commented Mar 13, 2023

@dimonchik0036 the plugin works with both Java and Kotlin, but it detects much more refactorings in Java code than in Kotlin. We plan to increase the number of refactorings the plugin is able to detect in Kotlin.

In the case you described, the plugin correctly identified Rename method refactoring, right?

And thank you for using the plugin! If you have any suggestions on how we can improve it or what features would be useful for you, please let us know! :)

@dimonchik0036
Copy link
Author

dimonchik0036 commented Mar 13, 2023

In the case you described, the plugin correctly identified Rename method refactoring, right?

Yep. The diff is correct too. The issue is only about how it looks – it treats as Java (probably some misconfiguration bug): a color scheme from Java in the diff editor and Java icons in the log

@onewhl onewhl self-assigned this Mar 24, 2023
@onewhl
Copy link
Collaborator

onewhl commented Mar 24, 2023

Hi @dimonchik0036, in the next release plugin will show icons depending on the file type (Kotlin icons for Kotlin files, Java icons for Java files). Thanks again for submitting the issue, I just didn't notice this before.
Screen Shot 2023-03-24 at 5 22 26 PM

About the color scheme in the editor -- could you please clarify if it changes the color scheme every time you open a file in the changes browser? Or only when you open refactoring visualization by double-clicking on the item in the list (when R button is selected)?

@dimonchik0036
Copy link
Author

Each language has its own color scheme. So Java files have one color, Kotlin files have another color.
I think the problem is that you are using JavaClassFileType everywhere instead of the original file type

@onewhl
Copy link
Collaborator

onewhl commented Mar 27, 2023

@dimonchik0036 Oh, I see, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants