|Extending XML Syntax Highlighting [message #201405]
||Sun, 07 October 2007 11:38
Originally posted by: uh5d.rz.uni-karlsruhe.de|
I want to recolor a special tag-name with a defined color in my xml
I figured out, that i must edit/extend the getAttributeFor( ITextRegion
region) method of the LineStyleProviderForXML class.
To identify my recoloring tag <BEHAVIOUR> I extract the Start and Length
( region.getStart(), region.getLength() ) of the Region if
region.getType() == DomRegionContext.XML_TAG_NAME
and then try to get the actual text of this tag by
Doc.get ( Start, Length ) where Doc is the underlying IStructuredDocument.
The problem is that region.getStart(), region.getLength() are relative to
the regions beginning and not the document beginning.
How can i find out what offset an ITextRegion has to the underlying
Powered by FUDForum
. Page generated in 0.03454 seconds