Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Problems with published StyledText API & documentation

We received feedback from and helped out one person before who implemented 
an editor using the LineStyleListener approach. I encourage you to be the 
second (known) person! It does seem to be possible <g>.
If you encounter any problems or have questions along the way please post 
them on the eclipse.tools newsgroup. We are monitoring it and try to reply 
promptly. If you find any bugs or find that things are missing or not 
explained well in the StyledText articles please open bug reports.

Knut





Michael Toomim <toomim@xxxxxxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
08/29/2002 01:03 AM
Please respond to platform-swt-dev

 
        To:     platform-swt-dev@xxxxxxxxxxx
        cc: 
        Subject:        Re: [platform-swt-dev] Problems with published StyledText API & 
documentation

Knut Radloff wrote:
> Michael,
> the default line styler that you use when you manage styles using the 
> StyledText API maintains styles relative to the text vs. fixed to the 
> range that was given in the style. This is in fact important information 


Thank you for the detailed response.  You answered all of my questions 
perfectly.

> Have you considered implementing your own LineStyleListener instead of 
> using API to update the styles in the StyledText widget? Styles that are 

> derived from dynamic data suggest investigating a custom 
LineStyleListener 
> implemention. Since you need to update styles based on syntax changes 
you 
> may gain performance and save memory by not storing any styles but 
instead 
> generating them whenever they are requested in the LineStyleListener. 
This 
> decision depends on how cheap it is to generate styles for a given line 
> based on your syntax tree.

Good advice.  This is, indeed, the direction I am taking.  The only 
problem is that JFace seems to have been designed mostly with the 
setStyleRange() API in mind rather than the LineStyleListener API, but 
I'm working through it. :)

Michael

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev





Back to the top