Revision 690045

Go back to digest for 22nd July 2007

Features in KDE Base

Dominik Haumann committed changes in /trunk/KDE/kdelibs/kate/jscript/katejscript.cpp:

use the underlying default styles to check, whether the current char is valid code or uninteresting part (like comments and strings).

The flow is as follows:
1. get the attribute list of the current highlighting
(it uses the KateRenderer, is there another way to get the list?)
2. get the current attribute
3. use this attribute as index for the attribute list
4. read the property AttributeDefaultStyleIndex and convert it to int
5. now we have the current character's defaultStyle
6. check, whether the defaultStyle is usable
7. if so, count the braces...

Imo, this is much better than the hack in KDE3 (which used the itemData names).
Todo:
* find a good place for a mapping function from attribute<->defaultStyle
* refactor to avoid code duplication ;)
* write a usable indenter (ewh)

File Changes

Modified 1 files
  • /trunk/KDE/kdelibs/kate/jscript/katejscript.cpp
1 files changed in total