Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] StyledTextContent


Thank you for your answers,
I will check the DefaultContent class, but I am not sure that the JavaViewer example uses SytledTextContent implementation. I will also check it. Anyway I managed my implementation to get work yesterday after hours of debugging. The problem appeared to be the splitting of the delimiter. My data was coming from a socket and the delimiter (\r\n) is sometimes splitting in to two consecutive read() statements. (ie: one with ending \r, and next starting with \n)

What is the correct behaviour for this situation? I solved it by deleting '\r' from the end of the fist read() and adding it in front of the next read().

Thanks
Bahadir


Felipe Heidrich wrote:

Did you check:
org.eclipse.swt.custom.DefaultContent It is a bit complicated but maybe it helps.
Felipe




Carolyn MacLeod wrote:
Also, the JavaViewer example is a fairly simple example of using a StyledText.
See org.eclipse.swt.examples.javaviewer in the eclipse example plugins zip.
If you haven't downloaded the eclipse examples zip yet, then you can get it on the download page for the version of eclipse SDK you are using - just scroll down a little bit further and look for "Example Plug-ins". Unzip this right on to of your eclipse install, and just overwrite the 2 license files when prompted.
Good luck,
Carolyn



Back to the top