Posted 19 years ago
by Calum Chisholm
-
Ingen Process Ltd.

Hi,
I'm currently working on a web-based tool which displays simple snippets of vb.net code to a user. It is my intention to replace blocks of code with a human-readable equivalent using collapsed regions.
For example, for the codeI would add labelled regions
And the end-user would see
I have already used this approach with some sucess in a windows-based app using the SyntaxEditor control.
The problem is that CodeHighlighter doesn't appear to support single-line regions (or multiple regions on a single line). I'm not particularly familiar with the language-definition stuff - is there a change I could make to my parser class to support this functionality?
It would also be handy if the outline checkbox column could be independantly enabled/disabled. I realise I can do this using javascript or CSS, but doing it server-side would be nicer.
Regards,
Calum Chisholm
I'm currently working on a web-based tool which displays simple snippets of vb.net code to a user. It is my intention to replace blocks of code with a human-readable equivalent using collapsed regions.
For example, for the code
return value_lookup(0,10) + value_lookup(1,15)
Calculation result = #Region " [Apples (current month)] " value_lookup(0,10) #End Region + #Region " [Oranges (previous month)] " value_lookup(1,15) #End Region
Calculation result = [Apples (current month)] + [Oranges (previous month)]
The problem is that CodeHighlighter doesn't appear to support single-line regions (or multiple regions on a single line). I'm not particularly familiar with the language-definition stuff - is there a change I could make to my parser class to support this functionality?
It would also be handy if the outline checkbox column could be independantly enabled/disabled. I realise I can do this using javascript or CSS, but doing it server-side would be nicer.
Regards,
Calum Chisholm