-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
Template class gets added to the import as well as its source code gets added to the output source folder #2987
Comments
Thanks for your report/ Imports have been reworked. Bug still present in 8.1.0? |
I think this is still an issue in 8.2.01, but perhaps I am just using it wrong, @monperrus ? To reproduce a small example could look like this:
|
Hello! It seems you put the full directory as input resource. What happens if you put only Example.java? |
I did, with the EDIT: You are welcome to have a look through the files above. 😉 EDIT2: This would be the logs with added print when the parent Click to expand the logs
|
If you only have If yes, that's clearly a bug. |
Yes, as in the example Is there any way I could help with this, @monperrus ? |
Yes! Would you be able to create a PR with a failing test case? That
would be super useful.
|
- add template to change `assert p` to `if (p) assert true; else assert false;` - add simple class with one assert and its desired transformation - add test method to check Launcher.run output with the template
Dear All,
I have two projects and therefore two source code folders
When generating a new class with some class template that extends ExtensionTemplate, lets say BaseLogicTemplate, an UNUSED import statement
import spoon.template.ExtensionTemplate;
gets added to the generated class.I have another template, CustomLogicTemplate that extends BaseLogicTemplate, and when generating a class with this CustomLogicTemplate, another an UNUSED import statement
import spoon.template.BaseLogicTemplate;
gets added to the generated class.In addition, source code of both templates
BaseLogicTemplate
andCustomLogicTemplate
are copied fromgen
project source code tomyapp
source code.Here is how a Launcher gets created:
The code is generated with
launcher.prettyprint()
method.Expected behaviour:
Can you please point me out where and how I can fix it?
I use the following version of Spoon in my gradle build file:
compile 'fr.inria.gforge.spoon:spoon-core:7.4.0'
Thank you,
Dmitry
The text was updated successfully, but these errors were encountered: