-
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 for Conditional Breakpoint not working in File class. #476
Fix for Conditional Breakpoint not working in File class. #476
Conversation
Would be very nice to have a regression test added, also please make sure there is one commit with proper commit message explaining the fix. |
7dd2292
to
b2bfc40
Compare
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.
Thanks for the new test, there are few smaller issues to fix, see comments above
org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.debug.tests/testprograms/FileConditionSnippet2.java
Outdated
Show resolved
Hide resolved
...tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsWithFileClass.java
Show resolved
Hide resolved
Also please rebase (do not merge with!) on latest master branch state. |
d67745e
to
92c6b47
Compare
d5b431b
to
5300310
Compare
...tests/tests/org/eclipse/jdt/debug/tests/breakpoints/ConditionalBreakpointsWithFileClass.java
Outdated
Show resolved
Hide resolved
1ea982a
to
ebb0044
Compare
5ef1ac9
to
e80b1dd
Compare
315815c
to
71a83de
Compare
Hi @jukzi ,could you pls review this ? |
71a83de
to
7b5ad57
Compare
if (((IJavaVariable) event.getSource()).getDebugTarget() | ||
.equals(getDebugTarget())) { | ||
if (event.getSource() instanceof IJavaVariable && event.getKind() == DebugEvent.CHANGE) { | ||
if (((IJavaVariable) event.getSource()).getDebugTarget().equals(getDebugTarget())) { |
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.
avoid typecast with instanceof pattern
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.
Will change those now.
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.
With all that code reformat it is hard to identify in the review what the actual change is. but overall it looks sane.
...ebug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ConditionalBreakpointHandler.java
Outdated
Show resolved
Hide resolved
...ebug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ConditionalBreakpointHandler.java
Outdated
Show resolved
Hide resolved
Is it possible with adequate effort to split the automated code reformating in a separate commit (Ok to have it in the same PR though) to make the review easier? For that you could just reformat the classes in question and rebase this PR on top of it. |
Sure will do that. |
5868e50
to
eb547ad
Compare
@RoiSoleil can you test if this PR solves the issue you raised? |
f19b1b2
to
292a24f
Compare
Actually the changes are only in ASTEvaluationEngine.createExpressionFromAST(String,EvaluationSourceGenerator,CompilationUnit) line: 601 ConditionalBreakpointHandler.breakpointHit(IJavaThread,IJavaBreakpoint) line: 222 Rest of changes are only for test cases. |
It's working with the PR. Ok for me. |
292a24f
to
1e424e0
Compare
looks ok, was tested => lets merge |
Thank you @jukzi |
What it does
Handles all the exception caused while evaluating conditional breakpoint java.io.File class
Fix for -> #273
How to test
Drop a valid conditional breakpoint inside java.io.File class and run in debug mode
Author checklist