Community
Participate
Working Groups
Create org.eclipse.swt.custom.RTFReader class to compliment org.eclipse.swt.custom.StyledText$RTFWriter class. Otherwise, content written by RTFWriter cannot be read back in. Separate RTFWriter from StyledText so that it is not an inner class. Optionally add get/setWriter and get/setReader member functions to StyledText with DefaultRTFWriter as the default writer, and DefaultRTFReader as the default reader.
Optionally provide a way to override the transfertypes for StyledText or add new once besided RTFWriter and PlainTextWriter.
Is this supposed to be fixed anytime in the near or not so near future? Pasting RTF is desirable.
*** Bug 201795 has been marked as a duplicate of this bug. ***
Any progress on this bug?
Is anyone working on this? If not, should the bug marked as helpwanted?
Fix would also be welcome for Platform Text, see bug 64498.
> should the bug marked as helpwanted? I'm not sure whether much help is needed AFAIK most of the code is there but just not API.
(In reply to comment #7) > > should the bug marked as helpwanted? > I'm not sure whether much help is needed AFAIK most of the code is there but > just not API. That is not true. We have the code that converts StyledRanges + text to a RTF string. I don't have the code that takes a RTF string, parses it, and creates the StyledRanges. so help is welcome.
Just to be clear: We don't need a fully general rtf parser (although that would be nice). To fix this, it would be enough to be able to parse rtf that is generated by RTFWriter.
Sorry, to late here. What Text would need is a public RTF writer.
Since we're past the API freeze, we're not going to be able to do this for 3.4, at this point. However, it seems like a perfectly reasonable request. Please consider this early in 3.5.
Some thoughts: 1) StyledText can only support a small subset of RTF. Still, this is a big work item. RTF spec is almost 300 pages. 2) StyledText does not always own the text and the style model. When the text changes caused by clipboard operations the text model is notified by an existent mechanism (textChanging/textChanged event). For styles we don't have an equivalent mechanism. For example, in Java Editor the user doesn't want RTF text to be inserted (the user wants the JavaEditor to choose colors/fonts). Other case is that the user wants RTF to be inserted but the styles model will override the styles set by the RTF reader when it is called.
Any update?
(In reply to comment #13) > Any update? This is not in the plan. It would make more sense for somebody else to get an existent RTF parser for java and use it to implement this feature. I can change StyledText to allow user-defined data transfers (maybe fix bug 255013 and bug 106822 in the process).
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. If the bug is still relevant please remove the stalebug whiteboard tag.