rocker icon indicating copy to clipboard operation
rocker copied to clipboard

Default imports ?

Open albert-kam opened this issue 5 years ago • 2 comments

I would like to import these into all of my templates without having to declare them manually.

@import com.fizzed.rocker.*
@import java.util.*
@import etc.*

And the list could grow overtime.

It would be nice to be a part of the options in rocker-compiler.conf, something like:

default.imports=com.fizzed.rocker.*, java.util.*

albert-kam avatar Jan 01 '20 10:01 albert-kam

@albert-kam Another suggestion I had thought of as well when originally working on Rocker. I ended up not doing this since Java doesn't do it. However, I certainly could be persuaded the other way, that default imports are a good idea. If you were interested n a PR that implemented this, I'd be open to evaluating it!

jjlauer avatar Jan 07 '20 15:01 jjlauer

My guess is that the problem is the lack of IDE integration. If the IDE was able to resolve and automatically add imports, it wouldn't be a problem, but since no one in the community with knowledge on how to maintain an IDE plugin has stepped up, people are looking for stop-gap solutions.

#12 #97

bendem avatar Jan 08 '20 09:01 bendem