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

Missing CtTypeReference for instanceof expressions when querying. #392

Merged
merged 2 commits into from
Oct 25, 2015

Conversation

revaultch
Copy link
Contributor

When rewriting a type instanceof expressions are not updated with the new type.

@GerardPaligot
Copy link
Contributor

Thanks @revaultch and this PR should fixed this issue #349 so that's cool! :)

launcher.run();
final CtClass<?> aClassX = (CtClass<?>) launcher.getFactory().Type().get("spoon.test.refactoring.testclasses.AClassX");

final CtBinaryOperator<?> instanceofInvocation = aClassX.getElements(new AbstractFilter<CtBinaryOperator<?>>(CtBinaryOperator.class) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a better way to do that: use new TypeFilter<CtBinaryOperator<?>>(CtBinaryOperator.class).

formatting fixed
@revaultch
Copy link
Contributor Author

I imported SpoonFormatterPrefs.xml in Eclipse, but the resulting formatting doesn't seem to correspond to what's in the repo. Can you update said file or give instructions on the formatting?

@GerardPaligot
Copy link
Contributor

Thanks for the report, I created an issue for that: #393

@monperrus monperrus merged commit f9fc6ed into INRIA:master Oct 25, 2015
@monperrus
Copy link
Collaborator

Thanks a lot @revaultch for this first contribution to Spoon! You can propose a PR on the README/pom.cml to add your name in the list of contributors.

Closes #349

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.

4 participants