Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default imports ? #124

Open
albert-kam opened this issue Jan 1, 2020 · 2 comments
Open

Default imports ? #124

albert-kam opened this issue Jan 1, 2020 · 2 comments

Comments

@albert-kam
Copy link

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.*
@jjlauer
Copy link
Member

jjlauer commented Jan 7, 2020

@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!

@bendem
Copy link
Contributor

bendem commented Jan 8, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants