Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 572136

Summary: IProblem[] org.eclipse.jdt.core.dom.CompilationUnit.getProblems() should provide link to list of issues in the same line per problem
Product: [Eclipse Project] JDT Reporter: Carsten Hammer <carsten.hammer>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: jjohnstn
Version: 4.19   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=567007
Whiteboard:

Description Carsten Hammer CLA 2021-03-20 04:57:03 EDT
In Bug 567007 there is an open NLS quickfix problem because of a space left in a line after the quickfix removes all unneccessary NLS comments. The quickfix processes one IProblem after another an has no chance to see that all NLS problems in the same line are removed. In case it sees there are following NLS comments after the first one it wants to remove it decides to let the leading space to remain.
If there was an information in the IProblem where I can determine that no comment is left after applying the quickfix it would be possible to solve the broken code.

The junit tests for the quickfix "StringCleanUp" currently test to make sure the whitespace is there after processing - so basically even the junit tests are broken.

Maybe someone has a better idea? I do not like the idea to do the whole analyzing step of jdt.core again within the jdt.ui code...
Comment 1 Jeff Johnston CLA 2021-06-17 17:54:39 EDT
Hi Carsten,

Can we close this since the original issue had a solution?