Author Topic: event sequence question?  (Read 17005 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5720
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: event sequence question?
« Reply #15 on: January 15, 2022, 03:10:49 am »
I think it should be a core plugin.

But this plugin should be excluded from the normal C::B user.  It's mainly for developers.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1203
Re: event sequence question?
« Reply #16 on: January 15, 2022, 11:39:59 am »
I have just added the plugin.

It is isolated from the workspaces and autotools, so it must be compiled explicitly if wanted (and should be disabled when not needed).

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: event sequence question?
« Reply #17 on: January 16, 2022, 07:15:46 am »
Under Linux the cbDisplayEvents-unix.cbp will not build as it has not been updated for wx30... and if you compare it to other unix project files there are a few other changes to bring it up to the current standard.
Attached is the project file I have building. I have not tested it yet as it will take about another hour to get everything saved, re-built and quickly tested on Linux.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5375
Re: event sequence question?
« Reply #18 on: January 16, 2022, 10:56:38 am »
please activate it also in the autotools and indeed bring it up to date. in line with other project files, that would be great.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1203
Re: event sequence question?
« Reply #19 on: January 16, 2022, 11:39:33 am »
I have added it to autotools in r12657, but I am not an autotools expert, so please review it.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: event sequence question?
« Reply #20 on: January 16, 2022, 11:51:02 am »
The display events plugin loads using the cbp attached to the post above. I now have the Linux workspace building in about 6 minutes instead of 189 after changing the -wall to -w as there are a HUGE number of warning that slow the build down due to the amount of text that needs to be processed due to the warnings.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1203
Re: event sequence question?
« Reply #21 on: January 16, 2022, 12:05:08 pm »
Added in r12658, thank you.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: event sequence question?
« Reply #22 on: January 16, 2022, 12:13:35 pm »
I am also not an  autotools expert, but you have the following line:
Code
dsplayevents_default="yes"

This would cause the plugin to be built by default, but I thought you did not want it built by default.
IMHO The Windows and Unix builds should be in sync with regards to building it by default or not.  Either way a change is needed. I will deal with the unix project files as part of ticket 1175 once the decision is made for the default to build or not.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: event sequence question?
« Reply #23 on: January 16, 2022, 12:40:58 pm »
@Miguel I am merging the code into my local source tree and spotted that there are issues with indention differences with the change in the src\plugins\Makefile.am where your changes use space, but the rest of the file uses tabs. I have not checked the other files.As there is no a ticket for this change I am including my feedback in this thread. If there was a ticket (I am assuming there is not a ticket) I would include the feedback in the ticket. There needs to be a way of giving feedback to changes that do not have a ticket, but I have no idea how this could be done easily or how to do this on SF SVN repo's.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5375
Re: event sequence question?
« Reply #24 on: January 16, 2022, 01:22:40 pm »
The display events plugin loads using the cbp attached to the post above. I now have the Linux workspace building in about 6 minutes instead of 189 after changing the -wall to -w as there are a HUGE number of warning that slow the build down due to the amount of text that needs to be processed due to the warnings.

I think the better solution, is to fix those warnings, and worst case pragma them out.

Note : for gcc, certain include paths can be silenced easily (eg wx) instead of -I<include_path> ==> -isystem<include_path>
That way we can focus on out own code and ignore the ones beyond out control.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5375
Re: event sequence question?
« Reply #25 on: January 16, 2022, 05:58:56 pm »
displayevents is in plugins (so not in contrib) which is ok, but I think it better acts as the other plugins then, meaning it does not have its own cbp files, but integrates directly in the CodeBlocks_wx<...>.cbp

What do you think ?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1203
Re: event sequence question?
« Reply #26 on: January 16, 2022, 06:38:19 pm »
You know better the build system than me. The only constraint is the plugin should not be in the nightly/release, because plugins activate automatically and this would waste time without any benefit for users.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1203
Re: event sequence question?
« Reply #27 on: January 17, 2022, 09:40:24 am »
I read somewhere that this plugin should be treated like the headerguard, i.e. a core plugin not added to the main project. I think this is the better solution, this way you can install it if needed but it will never go in the nightly/release.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: event sequence question?
« Reply #28 on: January 17, 2022, 10:32:01 am »
I was looking at the header guard and the other plugins by same author last night and they were not included because they can cause bad side affects if not used/configured correctly. As such these are probably not the best to use as a template.

Headerguard info:    URL info: https://wiki.codeblocks.org/index.php/Header_Guard_plugin    Problem:  The Header Guard plugin is included in Code::Blocks' source code (src/plugins/headerguard/), however, it is not built by default to prevent unexpected behavior.
It would probably be better to do one f the following:1) Create the cbplugin via the project file and leave it up toe the dev to manually install it2) Create the plugin in the devel directory but mod the profess so it does not copy the files to the output directory so it does not get released, but can be used when running he C::B as a debugee.3) Do both options 1 and 2
I am inclined to think option 3 would benefit the developers the most.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9660
Re: event sequence question?
« Reply #29 on: January 28, 2022, 07:15:46 am »
Just keep in mind that some plugins are for pros and spoeciual needs., These are:
* header guard
* debuggergdbmi
* DisplayEvents
* EventsDisplay
* loghacker
* modpoller
* tidy cmt
(Some of them form different sources.)

These I would consider as "special plugins" meaning its partially more a tech-demo or debugging tool and the average user won't use these. In fact, as written above they may cause unexpected side-effects. So any use should be done with care.
I would also think about whether or not to add these at all to a release. From my point of view they should probably all be in a separate workspace/project.
For an installer I would expect these on a separate page with a clear warning message and not to be installed by default.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ