Recent

Author Topic: Can you please comment on this UML diagram?  (Read 2038 times)

EganSolo

  • Full Member
  • ***
  • Posts: 140
Can you please comment on this UML diagram?
« on: December 28, 2016, 09:56:08 am »
I've captured a snapshot of some of the classes in TSynEdit involving TSynCustomHighlighter, TSynCustomFoldHighlighter and some of their related classes.

If you understand what some of these classes are for, could you please write a quick blurb? I'm trying to document this aspect of the highlighter and will share it back with the community.

Thanks!


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5695
    • wiki
Re: Can you please comment on this UML diagram?
« Reply #1 on: December 28, 2016, 11:49:30 pm »
First thing to read and understand is http://wiki.freepascal.org/SynEdit_Highlighter
This explains "ranges"


Some of the classes you list are internals, and should only be accessed by the methods provided.
e.g ...CodeFoldBlock (used by Start/EndFoldBlock methods,maybe indirect. maybe others)

--------------
MultiRangeList ... not checked, have not looked it up.... from memory... but VirtualLines makes me think it is part of the SynMultiSyn only (combine multiple highlighters // then each HL gets virtual lines, on which it can work, and they expose only the subset of the text, that is piped to the particular HL)....


------------------
Foldconfig

enables (per keyword) : folding, markup (matching begin/end if cursor is at either word), and other future markup.

in pas hl look for cfbtBeginEnd and other cfbt* .... each of them represents a keyword, and each (except some internal at the end of the list) has a config.
other HL (with fold) have similar enum.
--------------
FoldNodeInfoList

not needed for the highlighting itself. This is a helper class for other objects (eg MArkups) to access info on where folds start and end.


Mind that the HL never stores the ranges for a textbuffer. ranges are stored on the textbuffer. (see the tutorial)