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

review: refactor: refactor cloning code to increase extendability #1878

Merged
merged 3 commits into from
Feb 25, 2018

Conversation

monperrus
Copy link
Collaborator

@monperrus monperrus commented Feb 22, 2018

We want to be able, in the future, to slightly adapt the cloning behavior without touching the generator of cloning code.

In particular, it will be useful for #1869

@monperrus monperrus changed the title refactor: refactor cloning code to introduce CloneTailoringVisitor WIP: refactor: refactor cloning code to introduce CloneTailoringVisitor Feb 22, 2018
@monperrus monperrus changed the title WIP: refactor: refactor cloning code to introduce CloneTailoringVisitor WIP: refactor: refactor cloning code to increase extendability Feb 22, 2018
@monperrus monperrus force-pushed the refactor-clone branch 2 times, most recently from 77db20d to 69958ed Compare February 22, 2018 21:37
@monperrus monperrus changed the title WIP: refactor: refactor cloning code to increase extendability review: refactor: refactor cloning code to increase extendability Feb 23, 2018
@@ -134,4 +136,24 @@
protected <T extends CtElement> void addClone(Map<String, T> targetMap, String key, T value) {
targetMap.put(key, clone(value));
}

private CtElement initialTopLevel;
private CtElement cloneTopLevel;
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is purpose of these two members? They are actually useless - not accessible.

private CtElement initialTopLevel;
private CtElement cloneTopLevel;

public void tailor(spoon.reflect.declaration.CtElement element, spoon.reflect.declaration.CtElement other) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

javadoc? ;-)

@monperrus
Copy link
Collaborator Author

monperrus commented Feb 24, 2018 via email

@monperrus
Copy link
Collaborator Author

monperrus commented Feb 24, 2018 via email

@spoon-bot
Copy link
Collaborator

API changes: 1 (Detected by Revapi)

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.2.0-20180224.163820-108 / New API: fr.inria.gforge.spoon:spoon-core:jar:6.2.0-SNAPSHOT

Method was removed.
Old method CloneBuilder#build(CtElement, CtElement)
New none
Breaking binary: breaking

@pvojtechovsky pvojtechovsky merged commit 1030f7c into INRIA:master Feb 25, 2018
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.

3 participants