Author Topic: Header-Fixup plugin  (Read 17495 times)

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Header-Fixup plugin
« on: May 15, 2007, 01:09:18 pm »
Hi, I continue topic started in http://forums.codeblocks.org/index.php/topic,5880.msg45015.html#msg45015 here.

In few words, this plugin is small tool which may help finding missing include files. Currently it support only headers from C::B sdk to fix problems with building other plugins ;). Note that this tool should be used carefully since it is very immature now and may break your build in certain circumstances.

Sources in attachment.

Regards
  BYO

[attachment deleted by admin]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Header-Fixup plugin
« Reply #1 on: May 16, 2007, 07:41:17 am »
Hi Byo,

I couldn't sleep tonight so here comes another version yet "unfinished" but with the following new features:
- added option to allow #include "myheader.h" or #include <myheader.h>
- added detection of keywords inside strings (e.g. wxMessageBox(_T("cbMessageBox")) will no longer include binding for cbMessageBox)
- added some major parts of wxWidgets to a new wxWidgets binding (yet unfinished)

With regards, Morten.

Edit: Removed V0.3 - update is in newer topic reply.
« Last Edit: May 21, 2007, 10:59:49 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Header-Fixup plugin
« Reply #2 on: May 21, 2007, 10:59:05 pm »
...finally: Byo, I hope you are kind of proud of me... ;-)
V0.5 is out, additions this time:
- added (completed) full wxWidgets support
- added option to show why header files are included in the debug log
- added support for forward declarations in header files (!)

I've used it on quite some projects of mine and it *seems* to work quite well. Forward declarations support is surely not 100% perfect - e.g. fwd decl and header file will be added in case object is present as pointer and object instance in header file. Hence the debug log can easily help to resolve such duplicates.

With regards, Morten.

Edit: Removed ZIP archive due to new version.
« Last Edit: May 22, 2007, 06:02:58 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Alturin

  • Guest
Re: Header-Fixup plugin
« Reply #3 on: May 22, 2007, 02:01:54 am »
...finally: Byo, I hope you are kind of proud of me... ;-)
V0.5 is out, additions this time:
- added (completed) full wxWidgets support
- added option to show why header files are included in the debug log
- added support for forward declarations in header files (!)

I've used it on quite some projects of mine and i *seems* to work quite well. Forward declarations support is surely not 100% perfect - e.g. fwd decl and header file will be added in case object is present as pointer and object instance in header file. Hence the debug log can easily help to resolve such duplicates.

With regards, Morten.

I think you did not zip up two files perhaps?
      <Unit filename="wxsmith\configuration.wxs" />
      <Unit filename="wxsmith\execution.wxs" />

For me the wxsmith subdir is empty?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Header-Fixup plugin
« Reply #4 on: May 22, 2007, 07:42:55 am »
I think you did not zip up two files perhaps?
      <Unit filename="wxsmith\configuration.wxs" />
      <Unit filename="wxsmith\execution.wxs" />
....right. :? Have updated the archive accordingly. Using RAR this would not have happened... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Header-Fixup plugin
« Reply #5 on: May 22, 2007, 09:25:30 am »
...finally: Byo, I hope you are kind of proud of me... ;-)

Of course I am :) Thanks for looking after my ...ehm, plugin :). It starts to be quite impressive. I would never expect you'll get so far and looking forward to see next progress :)

BYO

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Header-Fixup plugin
« Reply #6 on: May 22, 2007, 06:02:12 pm »
[...] looking forward to see next progress :)
As you wish (:lol:): Version 0.6 comes with the following new/enhanced features:

- support for detecting forward declarations (not only adding them)
- added simulation mode
- added parsing of header files that belong directly to the source file for already included headers, too
- added "process headers files only" and "process implementation files only" for 2-step-fix up (it makes sense first to operate the header files only and then implementation files for better results).
- added some more bindings for C::B
- added report of included files which would not be required for known bindings (thus *might* be obsolete)
- slightly GUI re-design
- slightly cleaned up code

Have fun with it!

With regards, Morten.

Edit: Removed version due to an update... again... ;-)
« Last Edit: May 22, 2007, 10:06:24 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: Header-Fixup plugin
« Reply #7 on: May 22, 2007, 06:31:01 pm »
- added "process headers files only" and "process implementation files only" for 2-step-fix up (it makes sense first to operate the header files only and then implementation files for better results).

Maybe it could be done automatically - just grab list of files to process, then process .h files first and then .c/.cpp files :)

BYO

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Header-Fixup plugin
« Reply #8 on: May 22, 2007, 10:05:27 pm »
[...] just grab list of files to process, then process .h files first and then .c/.cpp files :)
Right... I thereby realise that you are trying to keep me busy... :lol: :lol: :lol:
Ok - here it is, v0.65:
- added support for 2-step fixup (or single step)
- made viewing list of (maybe) obsolete headers optional
- added a lot of tooltips for better understanding
- updated some log messages (make their meaning more clear)
- updated wxWidgets bindings (some macros were missing)
- updated project manifest (description...)
- finally... don't know what else to do??? ;-)
With regards, Morten.

Edit: Removed old plugin version as an update is available.
« Last Edit: December 29, 2007, 10:19:41 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Alturin

  • Guest
Re: Header-Fixup plugin
« Reply #9 on: May 22, 2007, 10:50:15 pm »
- finally... don't know what else to do??? ;-)

Add it to the contrib plugins workspace :lol:.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Header-Fixup plugin
« Reply #10 on: December 29, 2007, 10:19:02 pm »
Another (more or less) minor update, cause the plugin nearly got lost on my HDD:
ChangeLog (IIRC)
- updated to new log manager
- separated operations into it's own classes, for features to come...
- "adjusted" (work-around) sizer bug on Windows Vista (actually it's a wx bug)
- code clean-up
- log messages will have a trailer [HeaderFixUp]
- (...things I forgot...)
With regards, Morten.

[attachment deleted by admin]
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline mahdi.hasnat

  • Single posting newcomer
  • *
  • Posts: 2
Re: Header-Fixup plugin
« Reply #11 on: March 09, 2019, 02:16:48 pm »
How can I get source code of this plugin ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
« Last Edit: March 09, 2019, 02:39:46 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Header-Fixup plugin
« Reply #13 on: May 14, 2019, 01:35:38 am »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org