I currently use the "Projects" toolbar in "Directory View" to navigate through source code. I would like to be able to select an XMLCFG node and perform a specific action with it. The way I see it, there are several ways to accomplish this:
1) Overload the default macros and re-do the context menu(s). This seems like a very bad idea, involving a lot of work, and is strongly advised against in the SlickEdit documentation.
2) Have a custom button somewhere at the top of the SlickEdit UI that would launch a form that allows me to choose from a set of contextual options ('open directory (that corresponds to the selected XMLCFG node)', 'compile the corresponding directory tree under this node', and so forth). This is not a bad solution, but it has its limitations. For one, the 'menu form' here would not be dynamic, as I would like it. While I can create or customize a form 'on-the-fly' (using a macro), it turns out that I cannot load and display (using _command_execute('myform.e')) a menu form all during the execution of one macro. Apparently, when you call load('myform.e'), it only executes after the current macro has completed.
3) Have an event that fires when I do something to an XMLCFG node. There is still the aforementioned problem of not being able to create a form and
load it all at once, but this is still more convenient than clicking a button somewhere far away in the UI.
Ideally, this event would be fired upon a double-click on an XMLCFG node. But clicking and dragging a node or something along those lines would also work. The problem is, I have no idea how to hook such an event. I looked at this
thread and I don't see a way just yet. Maybe using something like _onfocus_?