Community
Participate
Working Groups
When testing the anonymous -> lambda conversion cleanups on jdt.ui, I saw cases where comments were lost in the process. We could try to preserve - Javadoc on the method - if we create a lambda without a block: comments inside the method body before/after the first/last statement The comments could be inserted on separate lines just before/after the enclosing statement of the lambda expression. We should not preserve block comments on the method, since these are often boilerplate /* (non-Javadoc) ... */ Examples: - TableTextCellEditor.java: text.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { e.display.asyncExec(new Runnable() { @Override public void run() { // without the asyncExec, focus has not had a chance to go to the content assist proposals TableTextCellEditor.this.focusLost(); } }); } }); - IntroduceFactoryRefactoring.java: Arrays.sort(hits, new Comparator<SearchMatch>() { /** * Sort by descending offset, such that nested constructor calls are processed first. * This is necessary, since they can only be moved into the factory method invocation * after they have been rewritten. */ @Override public int compare(SearchMatch m1, SearchMatch m2) { return m2.getOffset() - m1.getOffset(); } });
If we find a good solution, we should also apply it to bug 427169 comment 4.
*** Bug 516830 has been marked as a duplicate of this bug. ***
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Fabrice, is that issue still relevant?