suusan2go / kotlin-fill-class

Intellij plugin that provides intention action for empty constructor

Home Page:https://plugins.jetbrains.com/plugin/10942-kotlin-fill-class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken? in 2022.3.1

tgrushka opened this issue · comments

Not working for me in 2022.3.1 (either Community Edition or Ultimate Edition) on macOS Ventura (13.0.1 but probably does not matter).

(All I get with this plugin in this version is "(Do not) Show local variable type hits" toggle.)

Tried completely removing, cleaning, and re-installing both IDEs, and restarting of course after installing the plugin.

I am legally blind and this completion is important for accessibility (trying to go back and forth to arguments popup hint, which is font-scaled so all arguments don't even fit in the popup, is terrible).

Other (newer?) IntelliJ plugin, "Kotlin Auto Fill," is currently working great for me, but I still have to write the function with parentheses, go into the parentheses, then hit Option-Return. ("Add missing named call arguments" in that plugin is exactly, spot on what I want, but seems very, very illusive with IntelliJ out of the box... why?). Would be very helpful to be able to use either of these two plugins by typing the function, choosing the signature from the autocomplete menu, hitting Option-Return, and getting an option to auto-fill.

Thanks.

Hmm, it's correctly working in my environment (2022.3.1 Ultimate, macOS).

Please check Settings > Editor > Inspections > Kotlin > Fill class is enabled.

image

Unfortunately it doesn't appear to me either.
Also I noticed that the option "fill class is not available". Is it the same as "Auto fill" ?
image

I'm sorry for late response.

It's hard to investigate because I can't reproduce it in my environment, but do you see any logs about com.suusan2go.kotlin-fill-class in the idea.log?
The idea.log can be found from the menu Help > Show Log in Finder.
(I don't know about Windows, but you can probably find it the same way.)

The Auto-Fill option is probably from Kotlin Auto Fill plugin, which is different from Kotlin Fill Class.

If you also have Kotlin Auto Fill installed at the same time, “inspection" menu is expected to have both “Auto-Fill” and “Fill class” like this... 😕

image

I cna observe the same with Android Studio Giraffe which is based on this 2022.3.1 version. Both options are checked but in the context menu the options for filling the class is gone.

image

@davidtrpchevski
Thanks for the info.
Is the constructor / function you are trying to apply implemented in Kotlin?
If it is in Java, it cannot be filled.
If the same problem occurs in Kotlin classes, I would like to know if it occurs in all classes or only in some situations.

@oboenikui

Thanks for the quick response. Yes, the constructor is in Kotlin; ex. public final data class Video public constructor(videoId:String, title:String?)

This occurs only in some situations, this class is from a third party library that I use in the project, but in other places (local data class models) works fine. The interesting thing is this fill class used to work with the before mentioned Video class in the older Android Studio release (before 2022.3.1 release), for some reason, after the Android Studio upgrade it refuses to work.

@davidtrpchevski

Thanks! I was able to reproduce it!

Maybe now that I know how to fix it, I'll fix it in the next release.