SlickEdit Product Discussion > SlickEdit User Macros

SymHighlights GUI

<< < (2/7) > >>

eee:
SE : SlickEdit Pro 2016 (v21.0.0.12 64-bit)
with  hotfix_se2100_9_cumulative.zip

When loading HighlightDialog.e
get the following error in the status line: Identifier 'sc' not declared
and the attached dialog

eee:
It would also be nice to be able to set specific colors to specific words.
I managed to get the functions to receive a string (default '') in addition to using the selection or cur_word, but setting a specific color is a bit obscure, so I need help here.

Use-case: analyzing log files. Having constant colors for debug/info/warning/error would be an enormous enhancement.

jporkkahtc:
WRT "sc", at the top of the file change import to require
#require "sc/lang/IToString.e"
#require "sc/lang/IHashable.e"

I'm not sure what the difference is.

I want to develop this further, but I don't have a pressing need for it - so its just in my spare time right now.

I intended for the UI to allow you to pick a specific color for each word, but I've not written that part yet.
Probably not with a color picker, but something simpler like cycling the colors each time you click on the word in the UI.

eee:
OK.
But when you get to it, keep in mind the possibility to determine strings and bound colors via a macro call.
This will allow persistence.
e.g.
    SetSymHighlight("ERROR", 1);
    SetSymHighlight("WARNING", 2);
    SetSymHighlight("INFO", 3);
The numbers denote a color index.

jporkkahtc:
I've incorporated these suggestions into the new version - not quite ready yet.

WRT SetSymHighlight() - I have this now, but what I'd like to do is have save/load functions to take the current set of highlights and save to a file, and later restore them.

I'm considering supporting a regex as a match string, but this has some interesting effects and would be difficult to make it robust given an arbitrary user written regex.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version