-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
New implementation for replace #632
Conversation
looks good. why did you put there the commits related to the output? |
I understand. Because you put the result in src/main/java. It really makes sense. Could you separate those commits in a PR that we would accept first? |
Which commits? |
PR done here #634 |
merged, this one can be rebased.
|
import java.util.Map; | ||
import java.util.Set; | ||
|
||
class ReplacementVisitor extends CtScanner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds javadoc.
import static spoon.generating.replace.ReplaceScanner.GENERATING_REPLACE_VISITOR; | ||
import static spoon.generating.replace.ReplaceScanner.TARGET_REPLACE_PACKAGE; | ||
|
||
public class GeneratingTypeProcessor extends AbstractProcessor<CtType<?>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to ReplacementVisitorGenerator
@@ -228,7 +224,7 @@ public boolean equals(Object o) { | |||
} | |||
|
|||
public List<CtAnnotation<? extends Annotation>> getAnnotations() { | |||
return Collections.unmodifiableList(annotations); | |||
return annotations; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monperrus Should be ok here. |
launcher.run(); | ||
|
||
assertThat(build(new File("./src/main/java/spoon/support/visitor/replace/ReplacementVisitor.java")).Class().get(ReplacementVisitor.class)) | ||
.isEqualTo(build(new File("./target/generated/spoon/support/visitor/replace/ReplacementVisitor.java")).Class().get(ReplacementVisitor.class).toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.toString() required?
@monperrus Ok here. |
Closes #570