Apply "toggle type annotation" intention globally?


First of all, thanks for making this awesome environment, I don't know if we'd be able to use Scala without it!

We have a pretty large Scala codebase and are exploring ways we can speed up the autocomplete feature.  

When doing some local testing, we realized that when we avoid type inferencing on public members of a class that the client code's autocomplete is much faster.  This surprised me a little bit because I figured the plugin would cache that data when parsing.  But I'm sure there's a good reason.

There's already a very nice inspection called "Type annotation required" that allows you to highlight when public members are relying on type inference.  I'd like to be able to run that on a large scope, say a project, and have it insert the type annotations automatically.  But when I run it, there's no "quick fix" available.  I know the plugin can do this automated insertion because there's a nice intention called "Toggle Type Annotation".  But I can't figure out how to apply the intention to an entire fire or project.

Is there a way to do this?

Many thanks,

Comment actions Permalink

Hi Chris,

Intentions can't be applied to the scope, they are not designed for it.

I added the quick fix for the inspection. It will be available for IDEA 15 after it's release in the first week of November.

Hope that your enjoy of our IDE will continue.

Best regards,

Comment actions Permalink

Thats very exciting to hear Nikolay, that will save us a great deal of time!  We'll look forward to the 15 release :).  We'll definitely continue enjoying, we've been IntelliJ fans and customers for many years now, and your quick response solidifies that feeling.



Please sign in to leave a comment.