Unable to set a conditional breakpoint in a method with a parameter using generic extends X#694
Unable to set a conditional breakpoint in a method with a parameter using generic extends X#694RoiSoleil wants to merge 2 commits intoeclipse-jdt:masterfrom
Conversation
using generic extends X Fix eclipse-jdt#693
|
@RoiSoleil : the test fails: |
|
To fix this test fail i need to specify the generic method type in RemoteEvaluatorBuilder#build but there is no API on IEvaluationContext to do so. Could you take a look because i'm not sure i can handle it ... |
| */ | ||
| if (genericSignature.startsWith(String.valueOf(Signature.C_TYPE_VARIABLE)) || genericSignature.startsWith(String.valueOf(Signature.C_CAPTURE)) | ||
| if (genericSignature.startsWith(String.valueOf(Signature.C_TYPE_VARIABLE))) { | ||
| fixedSignature.append(genericSignature.substring(String.valueOf(Signature.C_TYPE_VARIABLE).length(), genericSignature.length() - 1)); |
There was a problem hiding this comment.
could you provide the value you get in the generic signature with your test case which you provided this fix for ?
The idea of the original fix was to avoid using generic types like in the failing test scenario since we are unable to resolve them in debugger context. The reason is we are unable to parse the snippet in such a way where we can resolve generics. So now with this fix, it seems the snippet might be ending up with a generic type which was not replaced, if you can debug the final snippet after applying the |
|
@RoiSoleil thanks for coming up with a PR, it is really appreciated the time you put into coming up with this fix. |
|
In SourceBasedSourceGenerator#adddTypeParameters we deal with type parameter so it works for normal breakpoint but in CodeSnippetToCuMapper we cannot specify type parameters so it fails ... |
Fix #693