SlickEdit Product Discussion > SlickEdit®

is the plugin mechanism useable in 25.0.2

(1/5) > >>

Graeme:
Is the plugin mechanism useable in V25.0.2 - it's not mentioned in the help file at all.

Clark:
It has not been documented yet because we still don't have the website side of this implemented yet. It is quite usable.

If you have multiple instances of v25.0.2 running, loading a plugin is not a applied to all instances. We have fixed this for v26.

I use this plugin mechanism for my add on macros. It's just easier to deal with. I invoke SlickEdit via a script which specifies the path to my plugins directory. Not sure if you'll need to get that fancy. I do because I have to run different versions of SlickEdit for testing and I constantly create and delete config directories.

bin/vs +new -sc config -sp /f/se64/vmacros/plugins "$@"&

Graeme:
Hi Clark

Thanks.  The xretrace plugin you created here is working for me in 25.0.2.
https://community.slickedit.com/index.php/topic,17704.msg69296.html#msg69296

I tried uninstalling the plugin and found the content of the folder did get deleted and the commands were all removed but slickedit reported
unable to remove plugin C:
\GP\SlickConfig ...

and if I repeat the plugin_uninstall command it shows xretrace as still being a plugin  - even though it is actually gone except for the folder.
When I first ran the uninstall command I actually had two of the associated files open in slick  - slick then prompted me that the two files had been deleted etc. and I closed them but the uninstall still said failure.

So now I tried trying to load the plugin with a slightly different name (graeme_nz instead of graeme) but I forgot to change over something in the xretrace.sh folder so I deleted the second plugin and this time it deleted ok.

So I fix the problem and the plugin loads ok now  - but it doesn't report that the plugin loaded successfully.  Maybe it should have a message box saying success, plus maybe open up the dialog that shows the list of active plugins.

Graeme

Clark:
I’ll check into this

Graeme:
A question  - if I need to shut down xretrace before the plugin is loaded so that the timer callback doesn't misbehave, is the definit and _on_load_module_xretrace that I have below ok for this.


--- Code: ---
void _on_load_module_xretrace(_str module_name)
{
   _str sm = strip(module_name, "B", "\'\"");
   if (strip_filename(sm, 'PD') == 'xretrace.e') {
      xretrace_kill_timer();
      xretrace_clear_all_markers();
   }
}

definit()
{
   //myerror();
   if (arg(1)=="L") {
      //If this is NOT an editor invocation
      xretrace_load_config();
      xretrace_kill_timer();
       //buffer_history_suspend = true;
      // this shouldn't be necessary because _on_load_module does it
      xretrace_clear_all_markers();
      buffer_retrace_cursor_list._makeempty();
      buffer_retrace_modified_lines_list._makeempty();
      buffer_bookmark_list._makeempty();
   }
   files_active_since_startup._makeempty();
   retrace_no_re_entry = 0;
   goback_is_loaded = false;
   if (def_xretrace_no_delayed_start && !file_exists(_ConfigPath() :+ 'DontRunMyMacros.txt')) {
      init_xretrace();
      xretrace_not_running = false;
   } else {
      xretrace_not_running = true;
      xretrace_has_been_started_id = 0;
   }
}

_command void xretrace_kill_timer() name_info(',')
{
   if ( retrace_timer_handle != -1 ) {
      _kill_timer(retrace_timer_handle);
      retrace_timer_handle = -1;
   }
}


--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version