Summary: | [navigation] 'Go to Next Annotation' doesn't find next error | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | daniel_megert |
Version: | 3.0 | ||
Target Milestone: | 3.0 RC1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Markus Keller
2004-05-19 07:08:17 EDT
not critical for 3.0 M9 should fix for 3.0 since it blocks to go to other annotations. The endPosition (85) of the problem reported by J Core is off by one (too long) - it points to '\r'. This causes the real selection to be smaller than the annotation and hence we can no longer navigate. Olivier - pls investigate and let me know. I am investigating. The error is reported using bodyEnd + 1 for the end position. I believe that removing this + 1 should be good enough. I will check if bodyEnd includes the closing '}' or not. If not, then the right fix is to scan for the '}' starting at bodyEnd position and then removing one to the resulting position. Sounds good. The only real problem for us is if it contains partial line delimiter Understood. To clarify, the end position we want includes the '}', but it should not go further. The following '\r' should clearly not be included. For a type declaration, bodyEnd is the position we want. But for a method declaration, we want bodyEnd + 1. Ideally we want to scan the position of the '}' in order to handle unicodes properly. Changing the end position to bodyEnd in the type declaration case instead of bodyEnd + 1 fixes it. It also works with unicode. The problem with unicode remains in case of a '}' written as unicode for the method declaration. The only way to fix it would be to scan the source again. Not sure this is necessary. Reporting a position inside a unicore character should not be a problem. Fixed and released in HEAD. NegativeTest>test392 is updated to reflect the changes. Verified in 200405281200 |