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

"New ..." only works with json file selected #412

Open
Jeansen opened this issue Dec 25, 2022 · 6 comments
Open

"New ..." only works with json file selected #412

Jeansen opened this issue Dec 25, 2022 · 6 comments

Comments

@Jeansen
Copy link

Jeansen commented Dec 25, 2022

If I want to generate code, I must select a JSON file but afterwards have to copy the content anyway. If I have any other file selected and call "New Kotlin data class File from JSON", nothing happens.

@Jeansen
Copy link
Author

Jeansen commented Dec 25, 2022

IntelliJ IDEA Version: Build #IU-223.8214.52, built on December 20, 2022
JSON to Kotlin Plugin Verison: 3.7.4
System: Debian/Bullseye

@wuseal
Copy link
Owner

wuseal commented Dec 27, 2022

Hi, @Jeansen , Sorry, I don't know what's the function you want. is that you want to generate code in exist kotlin file? if it is, you can refer next demo, open file--> right click content-> ....
demo

@Jeansen
Copy link
Author

Jeansen commented Dec 27, 2022

Hi @wuseal. The Problem is: When I go to File -> "New Kotlin data class File from JSON", no dialog appears. It only appears, if I select a JSON file befor in the project tree. If I select e.g. a Kotlin file or any other file and then go to File -> "New Kotlin data class File from JSON", nothing happens. No dialog appears, at all.

@wuseal
Copy link
Owner

wuseal commented Dec 27, 2022

I tried
IntelliJ IDEA Version: Build #IU-223.8214.52, built on December 20, 2022
JSON to Kotlin Plugin Verison: 3.7.4
OS: Mac OS 12.4
It works, can pop up the generate data class dialog both by select file(any file, not only json file) or in editor panel

Did you see the errors in IDEA when you do the actions?
Or can you help to attach the logs here?
image

@Jeansen
Copy link
Author

Jeansen commented Dec 27, 2022

I checked the log. Unfortunately, there's nothing in it, when invoking the plugin as describe above. What I found out more is, that this only happens on Kotlin files (.kt). Others work fine (sorry for this oversight). I do not have a MacOS system at hand, currently. But I'll have that option in a couple of days. I'll check if it happens on MacOS, too.

@wuseal
Copy link
Owner

wuseal commented Dec 27, 2022

Oh, So strange, I also checked right click on .kt file, it works fine here on MacOS, Maybe you can try uninstall&install JTK plugin to check if it will works fine

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