View previous topic :: View next topic |
Author |
Message |
octal
Joined: 05 May 2007 Posts: 7
|
Posted: Tue Oct 23, 2007 10:15 am Post subject: How to enable/disable Staple drawing by code ? |
|
|
Hi,
I defined a lexer for my language (a special basic subset), and I made structures like IF/ELSE/ENDIF or REPEAT/UNTIL to draw a staple.
All works fine.
Now I want to add in my program the possibility for the user to have a config window where he can check for each control structure a check box saying to show/hide the staple to make code visibility better.
How can I do that ?
How can I also do the same (visible/invisible) for code folding for Some structures (rules) only ?
Regards
octal _________________ http://www.pocketmt.com |
|
Back to top |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Tue Oct 23, 2007 5:28 pm Post subject: |
|
|
Hello,
All lexer properties are published. You may see that all settings may be changed in Delphi's object inspector.
Any change of lexer properties immediately applied to all connected editors.
Lexers (TSyntAnlyzer) may be saved to file/stream in text DFM format.
So provide customization of lexers you need to make dialog which will change some properties of lexer and save modified lexer to file or to registry (via string stream). When loading application you need load changed resources of lexers.
Main point is that - lexer is resource.
Michael. |
|
Back to top |
|
|
|