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

Generate import statements #153

Open
hohwille opened this issue Aug 6, 2015 · 1 comment
Open

Generate import statements #153

hohwille opened this issue Aug 6, 2015 · 1 comment

Comments

@hohwille
Copy link
Member

hohwille commented Aug 6, 2015

Currently CobiGen does not generate many import statements most of them are missing. This is somewhat compensated by invoking organize imports.
However, this solution is not sufficient and and reliable.
Sometimes the Classname itself is not unique and organize imports can not guess the import statement. So currently I often end up with code that can not compile and needs manual rework. This is not what we want to have.

Instead the templates should also iterate over the properties and add import statements. Still organize imports should be used to do tidy up of imports. For me the question is how to make it easy to generate the imports using macros and to avoid duplicated or pointless imports. Maybe we need to collect the imports in a set first and then generate the actual import statements.

Still for such things I think freemarker is a little limited and we need to open a door to embedding real code into macros for the required power but this is a different issue.

@github-actions
Copy link

Stale topic. Please negotiate closing or discussing the relevance of this ticket.

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

No branches or pull requests

2 participants