Stupid side effect: overly aggressive import optimization
So I have a small class, and I went to add a comment at the top of the
class.
I type the /** to start the comment, the entire class goes into the
comment, IDEA discovers that it doesn't need to import anything, removes
ALL of the imports, then when I put in the close comment, everything is
red because nothing is being imported.
Sorry, but that is a whole lot of badness and needs to be fixed.
Please sign in to leave a comment.
Already fixed via IDEA-113299 Imports removed when writing javadoc. The bug reports it was fixed in IDEA 13 build 132.188. I can comfirm that the issue does not occur in the 14.0.3 EAP build 139.872.1 that I'm running.
When I start a Javadoc at the class level, and even when everything is commented out, my imports just change gray to indicate they are unused imports. I do have "Optimize imports on the fly" enabled. If I comment out a section of code that is the only use of an imported class, the import statement is immediately removed.
No, I am definitely seeing it in 139.872.1.
On 1/6/15 11:26 PM, Mark Vedder wrote:
>
I see in the comment you added to the bug report I referenced that you are seeing it Scala files. Are you also seeing it in Java files?
If you are just seeing it in just Scala files, I recommend you open a new bug report for the Scala Plug-in Project (SCL) to report it.
Hmm. Well, I don't write any Java, but I tried it, and it does appear to
only be a problem in Scala, so I filed a new Scala request.
On 1/6/15 11:56 PM, Mark Vedder wrote:
>