-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fix lack of type resolution issue due to lack of imports. #275 #280
Fix lack of type resolution issue due to lack of imports. #275 #280
Conversation
00b5b08
to
0e82b6b
Compare
0e82b6b
to
fba705b
Compare
b646719
to
6260d38
Compare
@testforstephen will you have time to have a look at this ? |
this is a valuable contribution, thanks. I'm also interested in this feature #186. I'll find some time to take a look. |
Hi @gayanper, The approach you use to dynamically add the import statements for the evaluation snippets looks good. I think we can apply it to the case in the issue #186 as well, where we can resolve the unresolved types and automatically append their fully qualified names in the import statements. However, I have some questions about the use cases you used in the Java8Tests.java file. Both of the snippets Could you provide more use cases that demonstrate the problem you want to fix in this PR? Thank you. |
It works because I attached However, compared to SourceBasedSourceGenerator, the BinaryBasedSourceGenerator still has some limitation. For example, |
You mean the snippet already in the unit test or something different? |
I'm using the new unit test added your PR. |
@testforstephen do you mean the unit test fail when you execute or it fails when you try run the changes in workspace and try it on a real project debugging scenario? |
The existing test cases you added can pass. My point is that there are other cases not covered well by this PR. Below is the eval comparison between SourceBasedSourceGenerator and BinaryBasedSourceGenerator.
|
org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/Java8Tests.java
Show resolved
Hide resolved
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.
LGTM
d8d052b
to
bc94fca
Compare
The changeset tries to generate missing constructors and add imports for variable type that are visible in the evaluation __run method.
bc94fca
to
ce1ea14
Compare
What it does
The changes will add import statements for found types while traversing symbols in the binary class definition so that the evaluation snippet will properly compiled without needing to have FQN names.
How to test
Unit tests and sample project
Author checklist