Miha-x64 / Mikes_IDEA_extensions

IntelliJ IDEA: missing parts.
Apache License 2.0
34 stars 7 forks source link

Request: offer inspection for Kotlin, to avoid comment-block that ends with code in the same line #22

Closed AndroidDeveloperLB closed 2 years ago

AndroidDeveloperLB commented 2 years ago

Many times, when I convert some Java code that has a comment-block and then some code beneath it (on a new line), I get them both in the same line.

For example, from this:

/* comment*/
foo();

I get this in Kotlin:

/* comment*/ foo()

Can you please add an inspection to fix this? I'd prefer to use // instead BTW. If this could be even another inspection (unless it's JavaDocs of course), could be nice.

Miha-x64 commented 2 years ago

The first request is a problem which is not on my side. I've found an issue, and it's even reported by you! Forcing a certain codestyle is not a goal of this plugin. And this is a perfectly valid construct: /*recurse*/ work(a, b, c).

The second one is also related to codestyle. And you can easily swap /**/ with // back and forth with an Alt+Enter intention.

AndroidDeveloperLB commented 2 years ago

Right. That's me.

As for "can easily swap" , that's incorrect. I have to manually go over each place and do it.

Miha-x64 commented 2 years ago

OK, “add an ability to swap all block comments with line ones” is potentially a YouTrack issue for an existing intention in IntelliJ.