Author Topic: xretrace and xxutils V2.20 / includes plugins for slick V26  (Read 12642 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: xretrace and xxutils V2.0
« Reply #15 on: September 09, 2021, 02:05:12 AM »
FYI: I'm always using the "+new" option when launching vs. So for first and second instance of vs I launch with "vs +new". This is embedded in my script that invokes SE, so it is always there. Maybe this is what you need for reproduction.

Also in Linux I also always launch SE with the "-st 0" option to minimize corruption. Learned from: https://community.slickedit.com/index.php?topic=11353.15

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: xretrace and xxutils V2.0
« Reply #16 on: September 09, 2021, 06:56:28 AM »
Should be fixed now.  I put it back to the old way - after loading xload-macros.e you have to manually call xxutils-xretrace-load on the command line.  It's in github.  Thanks for all your testing and information.

For V26 I was hoping to only support the plugin version of xretrace.  For V26 in xretrace definit I had to call init-xretrace() twice otherwise the time doesn't start running.  Another weird thing is that when xxutils-xretrace-load runs, it brings up the xretrace settings dialog  - but it brings up the previous form of the dialog  e.g. V2.0 instead of V2.01.  I don't feel motivated enough to investigate!


rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: xretrace and xxutils V2.0
« Reply #17 on: September 09, 2021, 01:15:06 PM »
Thanks Graeme, so far so good.

How to use the plugin to install? I don't see any instructions on how to do that in the pdf file? If I knew how to do this I would.

I also see some other definit() in other .e files using arg(1) and checking it against 'L'. Now that we know that we can see 'L' in second instance as well as loading maybe these need to be re-reviewed to decide if they are appropriate?

Also in xretrace.e does this need to be set to an initial value in its declaration?

Code: [Select]
static int xretrace_has_been_started_id;
I say this because xretrace_clear_all_markers() checks it and xretrace_clear_all_markers() is called in the definit() of xretrace.e when arg(1) is "L".

Code: [Select]
_command void xretrace_clear_all_markers() name_info(',')
{
   if (xretrace_has_been_started_id == XRETRACE_HAS_BEEN_STARTED_ID) {
      dlist_reset(track_demodified_list);
      _LineMarkerRemoveAllType(retrace_marker_type_id);
      _LineMarkerRemoveAllType(retrace_marker_type_id_mod);
      _LineMarkerRemoveAllType(retrace_marker_type_id_demod);
   }
}
« Last Edit: September 09, 2021, 01:44:44 PM by rowbearto »

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: xretrace and xxutils V2.0
« Reply #18 on: September 12, 2021, 06:44:02 AM »
I've uploaded a new version that I've been working on for a couple of weeks.  xretrace is now a single module (single ex file) which makes it easier for it to be a plugin.  I also free some line marker types which I wasn't doing before.  I'm still looking into the plugin - I have to consider prefixing all macro commands with "user_graeme_" to make them unique.  Currently I have an x prefix which hopefully means they don't clash with the "normal" commands.

I fixed the definit issues a few days ago with help from Clark here
https://community.slickedit.com/index.php/topic,18338.msg72378.html#msg72378

xretrace_has_been_started_id is a static variable that is assigned by definit regardless of whether it's a load or a restart.

For slick V26 the xretrace timer doesn't start running at startup - it does in older versions.  I have no idea why so I've posted a report in the beta forum.
https://community.slickedit.com/index.php/topic,18414.0.html
When you first use one of the xretrace commands e.g. xretrace_cursor, it will check if the timer is running and ask if you want to start it if it isn't running.

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: xretrace and xxutils V2.0
« Reply #19 on: September 13, 2021, 02:52:08 AM »
Updated to V2.11 to fix an issue with a debug variable.


Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: xretrace and xxutils V2.0
« Reply #20 on: September 16, 2021, 04:37:06 AM »
xretrace V2.12 fixes a problem with detecting inserted lines as modified lines.
updated in github also.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: xretrace and xxutils V2.0
« Reply #21 on: September 16, 2021, 01:05:37 PM »
Thanks Graeme.

What is the best way to upgrade an existing install? I've been unloading each module then doing the 'normal' install, but is there a better way? Can I just reload the xload-macros.e and rerun the install command without unloading?

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: xretrace and xxutils V2.0
« Reply #22 on: September 16, 2021, 10:55:25 PM »
Yes, just reload and re-run, you don't need to manually unload any modules.  I'll put that in the help file.

I'm changing xxutils to be a "single module" rather than multiple ex files, to make the plugin easier.  For this situation (and some others) it's necessary to manually unload the ex files and also to remove unwanted files from the tag file.  I'll make this clearer in the help file.  Once you're using the plugin you don't need to manually do anything, except load or update the plugin.



Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: xretrace and xxutils V2.20 / includes plugins for slick V26
« Reply #23 on: September 23, 2021, 04:35:33 AM »
I've updated xretrace to V2.20, the zip file is in the first post of this thread, plus there are plugins for V26 there as well.

For xxutils, all of the commands now have a prefix of user_graeme_ to ensure they are unique.  If you don't want the prefix, you can change these
#define XUN(a) user_graeme_##a
#define XUNS "user_graeme_"
to this
#define XUN(a) a
#define XUNS

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: xretrace and xxutils V2.20 / includes plugins for slick V26
« Reply #24 on: November 26, 2021, 07:36:24 PM »
I installed the plugin today. After selecting the .zip file with 'plugin_install' I got the attached error message about "no_touch_line_modify_flag_checkbox". After clicking OK the plugin does seem to work fine.

EDIT: I am also seeing this warning upon a restart of SE.
« Last Edit: November 26, 2021, 09:40:15 PM by rowbearto »

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: xretrace and xxutils V2.20 / includes plugins for slick V26
« Reply #25 on: December 08, 2021, 09:19:17 AM »
Hi Rob

Sorry for the delay.  I can't reproduce this problem but I have seen it before.  It's possible it is the result of switching from the non plugin version to the plugin version.  My previous comments in this thread are probably out of date about how to do that and not what I ended up putting in the help file.  I suggest that you try uninstalling everything, then reinstall the plugin
1.  run the command xretrace_disable
2.  run plugin_uninstall from the cmdline and uninstall xretrace
3. use the unload_module command in the macro menu and unload all the xretrace.ex files if any  - xretrace.ex  xretrace_scrollbar.ex  xretrace_popup.ex  DLinkList.ex
4. remove any xretrace files from the slickc tag file
5. use the plugin_install command to reinstall xretrace.

Let me know if it doesn't fix the problem.

Edit : Once you have the plugin installed and working, to install an update you just run plugin_install again.  You don't have to uninstall anything.  If you change the source files in the plugin folder you can rebuild by macro -> load module -> xretrace.e.  xretrace.e is the only file you need to load - it #includes all the other needed files.  slick also automatically rebuilds the plugin at startup if needed  - although the #include mechanism might defeat this  - I don't know.  Some of the #included xretrace source files have an "esh" extension instead of an "e" extension.  This is so that the plugin manager doesn't try to build them into individual .ex files.

« Last Edit: December 08, 2021, 09:33:58 AM by Graeme »

niexin.liu

  • Community Member
  • Posts: 17
  • Hero Points: 0
Re: xretrace and xxutils V2.20 / includes plugins for slick V26
« Reply #26 on: January 15, 2022, 07:51:58 AM »
This plugin is really too good, thank you very much.

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Re: xretrace and xxutils V2.20 / includes plugins for slick V26
« Reply #27 on: January 15, 2022, 10:57:35 AM »
This plugin is really too good, thank you very much.

Thanks.  Let me know if you have any problems or suggestions.