In SourceInsight, when multiple symbol locations found while performing "Jump to Definition". A symbol list with preview field will be shown and it is very convenience to choose the symbol because you can preview them. (See pic 1)
But Slickedit does not have the preview field. When you selecting tags, it is very hard to choose the right one if there are many tags listed without a preview. So I added a callback function to capture the selected item in list and show it in the Symbol Window. (See pic 2)
1. Open tags.e
2. Find the tag_select_match() function
3. Insert this callback function before it:
defeventtab _select_tree_form;
/**
* Callback routine handles the select_tree dialog events.
* It shows the selected tag preview in the symbol window.
*
* @param reason
* @param user_data
* @param info
*
* @return _str
*
* @author Ding Zhaojie
*/
static _str tag_select_callback(int reason, typeless user_data, typeless info=null)
{
switch (reason) {
case SL_ONINITFIRST:
case SL_ONSELECT:
if (info != null) {
_nocheck _control ctl_tree;
struct VS_TAG_BROWSE_INFO cm;
typeless temp;
_str caption = ctl_tree._TreeGetCaption(info);
parse caption with cm.member_name "\t" caption;
if (cm.member_name != '') {
parse caption with cm.file_name "\t" caption;
parse caption with temp "\t" caption;
cm.flags = 0;
cm.class_name = '';
cm.type_name = '';
cm.line_no = temp;
cb_refresh_output_tab(cm, 1);
}
}
break;
}
return '';
}
4. Register the callback function: In tag_select_match() find the "match_id = select_tree" line, you will see "null, null, null". Change the second "null" to "tag_select_callback".
5. Reload tags.e.
Have fun