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

New implementation for replace #632

Merged
merged 8 commits into from
Apr 28, 2016
Merged

New implementation for replace #632

merged 8 commits into from
Apr 28, 2016

Conversation

GerardPaligot
Copy link
Contributor

@GerardPaligot GerardPaligot commented Apr 26, 2016

Closes #570

@monperrus
Copy link
Collaborator

looks good. why did you put there the commits related to the output?

@monperrus
Copy link
Collaborator

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?

@GerardPaligot
Copy link
Contributor Author

Which commits?

@monperrus
Copy link
Collaborator

79803cb

4fb7228

Others are related to the formatting changes?

--Martin

@GerardPaligot
Copy link
Contributor Author

PR done here #634

@monperrus
Copy link
Collaborator

monperrus commented Apr 26, 2016 via email

import java.util.Map;
import java.util.Set;

class ReplacementVisitor extends CtScanner {
Copy link
Contributor Author

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<?>> {
Copy link
Contributor Author

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GerardPaligot
Copy link
Contributor Author

@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());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.toString() required?

@GerardPaligot
Copy link
Contributor Author

@monperrus Ok here.

@monperrus monperrus merged commit 9c01a53 into INRIA:master Apr 28, 2016
@GerardPaligot GerardPaligot deleted the feat_replace branch April 28, 2016 08:35
@tdurieux tdurieux mentioned this pull request Jun 24, 2016
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

Successfully merging this pull request may close these issues.

2 participants