Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-text-dev] line wrapping

Is there an article or document that covers folding, segmented views, projection, ProjectionDocument, ProjectionViewer, ProjectionDocumentManager, ITextViewerExtension5, IDocumentInformationMapping, and so forth? It's all relatively new and poorly understood outside of the text team so if there isn't one, consider this a request for one. The only info outside of Javadoc I've found so far is your mail below and a description in a buildnotes file:

http://download2.eclipse.org/downloads/drops/R-3.0-200406251208/buildnotes/buildnotes_text.html

Thanks,

--Ed



From: Kai-Uwe Maetzel
Sent: Friday, October 01, 2004 7:02 AM
Zohar,

The StyledText widget supports line wrapping. Line wrapping is not considered in any layer higher up.  Thus, text viewers and text editors are not aware of line wrapping.  However, because of the existing support for folding and segmented views clients are supposed to never directly map between widget coordinates and viewer coordinates. (Viewer or model coordinates are those that are expressed in terms of character offsets of the viewer's input document. In case of folding or segmented mode, the visible document differs from the input document.) Clients should use the ITextViewerExtension5 interface for conversion.  The text viewer itself uses an IDocumentInformationMapping instance to implement the extension interface. This all should make line wrapping work in most case already. For displaying, problem areas are most likely to be found in the vertical ruler columns such as the LineNumberRulerColumn and the AnnotationRulerColumn and in the editor's status line item displaying the caret coordinates. For interaction, problems will show up everywhere where we expect a model line to match a displayed line. Among other these might be: moving/copying lines, deleting/cutting lines, extending selection to be a line selection, etc.

Back to the top