Community
Participate
Working Groups
Created attachment 277676 [details] Rendered code mining with line breaks. Overview: Currently, code mining only supports text without line breaks. This is due to the fact that `org.eclipse.jface.text.codemining.AbstractCodeMining.draw` only calls `org.eclipse.swt.graphics.GC.drawString` and `org.eclipse.swt.graphics.GC.stringExtent`. They do not execute any tab expansion or carriage return processing as documented. To Reproduce: Simply override `org.eclipse.jface.text.codemining.AbstractCodeMining.draw` and call `org.eclipse.swt.graphics.GC.drawText` and `org.eclipse.swt.graphics.GC.textExtent` instead (they do carriage return processing). Now, line breaks are rendered correctly. On the downside, the following text in the editor will overlap because `org.eclipse.jface.text.source.inlined.LineHeaderAnnotation.getHeight` only calculates the text height with `org.eclipse.swt.custom.StyledText.getLineHeight` not taking line breaks into account (see the attached image). Expected Results: `org.eclipse.jface.text.source.inlined.LineHeaderAnnotation.getHeight` takes newlines (if present) into account. Note: The same applies to `org.eclipse.jface.text.source.inlined.LineContentAnnotation`.
*** Bug 546995 has been marked as a duplicate of this bug. ***
we would also be interested in this feature. We actually tries to implement some in-house solution, which works rather well on default resolution scaling (100%), however it has issues when the resolution scaling is non-default.