Community
Participate
Working Groups
In TextViewer.getVisibleLinesInViewer(), the number of lines returned is incorrect if some lines are longer than the viewer width, and the viewer has style SWT.WRAP. This causes TextViewer.internalRevealRange(int, int) to work in an unexpected way if the viewer is not wide enough to display full lines of text in the document. If that is the case, calling internalRevealRange(doc.get().length-1, 1) will not necessarily scroll to the bottom of the document.
This is needed to get scrolling to work correctly in the External Tools / Ant console.
TextViewer and subclasses do not provide support for SWT.WRAP. This will not change for 2.0. Updated JavaDoc accordingly. Propose to either remove SWT.WRAP or to use dedicated method for revealing the end of the document: protected void revealEndOfDocument() { IDocument doc= getDocument(); int docLength= doc.getLength(); if (docLength > 0) { StyledText widget= getTextWidget(); widget.setCaretOffset(docLength); widget.showSelection(); } }
Get rid of deprecated state.
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.