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: feature: CtElement#getRoleInParent() #1669

Merged
merged 2 commits into from
Nov 1, 2017

Conversation

pvojtechovsky
Copy link
Collaborator

implements #1658

@monperrus
Copy link
Collaborator

Looks super promising. I'd propose to call the new method getRoleForParent

@pvojtechovsky
Copy link
Collaborator Author

What about getRoleInParent ?

@monperrus
Copy link
Collaborator

getRoleInParent is OK

@pvojtechovsky pvojtechovsky changed the title WiP: feature: CtElement#getMyRoleInParent() review: feature: CtElement#getRoleInParent() Oct 31, 2017
@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-20171031.203734-134

New API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old none
New method spoon.reflect.path.CtRole spoon.reflect.declaration.CtElement::getRoleInParent()
Code java.method.addedToInterface
Description Method was added to an interface.
Breaking binary: non_breaking

@pvojtechovsky
Copy link
Collaborator Author

@monperrus ?
[ERROR] Failures:
[ERROR] CtScannerTest.testScan:251 expected:<3968> but was:<3972>

@monperrus
Copy link
Collaborator

monperrus commented Oct 31, 2017

Strange. This assertion/commit was verified in PR and in master (https://github.com/INRIA/spoon/commits/master).
Anyway, this assertion is meant to catch differences in scanning behavior. How does this PR change the scanning behavior?

@pvojtechovsky
Copy link
Collaborator Author

pvojtechovsky commented Nov 1, 2017

The scanner behaves well, but this PR contains fix of CtVariableAccessImpl#getVariable(), which causes that spoon model is bigger (no information is lost, because of bug) and therefore scanner founds more nodes.

I made a test and fix for that bug #1684

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-20171101.192517-136

New API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old none
New method spoon.reflect.path.CtRole spoon.reflect.declaration.CtElement::getRoleInParent()
Code java.method.addedToInterface
Description Method was added to an interface.
Breaking binary: non_breaking,

@monperrus
Copy link
Collaborator

The implementation is so elegant now!

@spoon-bot
Copy link
Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-20171101.192517-136

New API: fr.inria.gforge.spoon:spoon-core:jar:6.0.0-SNAPSHOT

Detected changes: 1.

Change 1

Name Element
Old none
New method spoon.reflect.path.CtRole spoon.reflect.declaration.CtElement::getRoleInParent()
Code java.method.addedToInterface
Description Method was added to an interface.
Breaking binary: non_breaking,

@monperrus monperrus merged commit 582b740 into INRIA:master Nov 1, 2017
@pvojtechovsky pvojtechovsky deleted the feaRoleInParent branch November 1, 2017 20:17
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