-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
Conversation
eb9346c
to
39a967e
Compare
77db20d
to
69958ed
Compare
69958ed
to
99cc313
Compare
@@ -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; |
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.
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) { |
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.
javadoc? ;-)
done :-)
|
you're right. not needed anymore since we use an inner class in "tailor". changed.
|
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
|
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