Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: earlgrey on September 27, 2015, 05:14:37 pm

Title: OpenFilesListPlus plugin
Post by: earlgrey on September 27, 2015, 05:14:37 pm
I made an enhanced version of the classic OpenFilesList plugin, called OpenFilesListPlus :

screenshot 1 (http://www.mediafire.com/view/5c6hlazxfg3hn78/presentation-features-001.png)
screenshot 2 (http://www.mediafire.com/view/32twxxgs23kx29f/presentation-features-002.png)

It is available on github here (https://github.com/earlgrey-bis/cb-OpenFilesListPlus)

Only for codeblocks versions >= svn revision 10502 - C::B compilation mandatory

Installation instructions are on the wiki (https://github.com/earlgrey-bis/cb-OpenFilesListPlus/wiki), but are only complete for Linux at the moment.

Feedback welcome on this thread.

( and thanx to the C::B team for having added my patch )
Title: Re: OpenFilesListPlus plugin
Post by: oBFusCATed on September 27, 2015, 05:28:28 pm
You can check this plugin https://github.com/obfuscated/cb_gdbmi for an example how to implement an autotools based build system for your plugin.

p.s. What are these cci and hhi files?
p.p.s. If you ask me the code is close to unreadable with all this aligning that you're using.
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on September 27, 2015, 05:42:22 pm
You can check this plugin https://github.com/obfuscated/cb_gdbmi for an example how to implement an autotools based build system for your plugin.
-> My work for this week.

p.s. What are these cci and hhi files?
cci = c++ code include file
hhi = c++ header include file
only 3 (big) files in which the .cci and .hhi files are included are compiled.
It's a ( bad ? ) habbit

p.p.s. If you ask me the code is close to unreadable with all this aligning that you're using.
I read other's code with difficulty because all seems scattered...

p.s. And I often use goto-s, getting lost with all those brackets
Title: Re: OpenFilesListPlus plugin
Post by: ollydbg on October 05, 2015, 06:37:41 am
p.s. What are these cci and hhi files?
cci = c++ code include file
hhi = c++ header include file
only 3 (big) files in which the .cci and .hhi files are included are compiled.
It's a ( bad ? ) habbit
Why not use the standard .h and .cpp files?
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on October 05, 2015, 06:23:50 pm
I group class functionalities by  ".hhi" and ".cci" file.
And it avoids me too many paste & copy of things like this :
Code
#include "sdk.h"                                                                // Code::Blocks SDK
//  ............................................................................
#ifndef CB_PRECOMP
    #include "manager.h"
    #include "configmanager.h"
    #include "configurationpanel.h"
    #include "editormanager.h"
    #include "projectmanager.h"
    #include "logmanager.h"
    #include "editorbase.h"
    #include "cbeditor.h"
    #include "sdk_events.h"
    #include "misctreeitemdata.h"

    #include "cbworkspace.h"
    #include "cbproject.h"
    #include "projectmanager.h"
#endif
, just #include the ".cci" & ".hhi" file

But I have never pretented beeing a good software designer :)

By the way,
Title: Re: OpenFilesListPlus plugin
Post by: ollydbg on October 06, 2015, 08:23:36 am
By the way,
  • did you try it ? Found it useful ? I always wanted to have at least separators in the OpenFilesList plugin.
  • what do you think is a simple way to track memory leaks in a C::B plugin ? How do you do ?
I haven't try it, since I normally does not use the standard OpenFilesList plugin yet.
What memory leaks do you have? Just run it under GDB?
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on October 06, 2015, 06:56:36 pm
What memory leaks do you have?
I dont know, I m searching for them

Just run it under GDB?
No, valgrind but it takes hours, even when removing lots of C::B plugins

Anyway, thank you for your answer -
Title: Re: OpenFilesListPlus plugin
Post by: oBFusCATed on October 06, 2015, 07:09:27 pm
If you're on linux you can try the address sanitizers. I think they can report memory leaks, but I'm not 100% sure.
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on October 06, 2015, 07:37:07 pm
I'm on my way to write a minimalistic fake codeblocks sdk for my plugin.
Title: Re: OpenFilesListPlus plugin
Post by: Abdulqayoom on December 22, 2015, 05:19:02 pm
I made an enhanced version of the classic OpenFilesList plugin, called OpenFilesListPlus :

screenshot 1 (http://www.mediafire.com/view/5c6hlazxfg3hn78/presentation-features-001.png)
screenshot 2 (http://www.mediafire.com/view/32twxxgs23kx29f/presentation-features-002.png)

It is available on github here (https://github.com/earlgrey-bis/cb-OpenFilesListPlus)

Only for codeblocks versions >= svn revision 10502 - C::B compilation mandatory

Installation instructions are on the wiki (https://github.com/earlgrey-bis/cb-OpenFilesListPlus/wiki), but are only complete for Linux at the moment.

Feedback welcome on this thread.

( and thanx to the C::B team for having added my patch )

how insttal it
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on December 23, 2015, 08:48:42 pm
how insttal it

Which platform ? I would willingly help, the more so as I didn't get many hits on github, although I find my plugin convenient & awsome :) (http://www.mediafire.com/view/dpmwjeuds8pnuhr/presentation-features-003.png)
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on December 30, 2015, 10:55:51 pm
You can check this plugin https://github.com/obfuscated/cb_gdbmi for an example how to implement an autotools based build system for your plugin.

I' ve done that, but gcc 4.9.2 define the two macros linux and  unix
Code
cpp -dM ./empty-file.hxx
#define __DBL_MIN_EXP__ (-1021)
...
#define unix 1
...
#define linux 1
...
#define __ATOMIC_RELEASE 3

which conflict with 2 static const bool in prep.h :

Code
@line 222 : const bool linux   = (id == platform_linux);
@line 228 : const bool unix    = (linux | freebsd | netbsd | openbsd | darwin | solaris);

so you get a "expected unqualified id before numeric constant" error
Title: Re: OpenFilesListPlus plugin
Post by: oBFusCATed on December 31, 2015, 12:32:39 am
You need to pass -ansi to the compiler or switch to c++11/14.
Title: Re: OpenFilesListPlus plugin
Post by: MortenMacFly on January 01, 2016, 05:00:09 pm
Installation instructions are on the wiki (https://github.com/earlgrey-bis/cb-OpenFilesListPlus/wiki), but are only complete for Linux at the moment.
BTW: You don't provide Windows project files. So many people will miss your plugin effort.
Title: Re: OpenFilesListPlus plugin
Post by: MortenMacFly on January 01, 2016, 05:53:50 pm
BTW: You don't provide Windows project files. So many people will miss your plugin effort.
OK, I tried to make a Windows project file so I had to look into it.

Unfortunately I have to say although I like the idea I finally gave up. I think in the current stage as the plugin is it won't make it into an official plugin. Here are the various reasons:
- strange file handling with *.cci *.hhi (not conform to C::B standards)
- not following C::B coding guidelines
- using jump marks
- a lot of serious compiler warnings that should be fixed
- many, many #defines for checking "something" the plugin does not need.
- added a lot complexity due to incorporating debug code (in fact it looks to me that w/o debug code the plugin would be 10% of the size)

I am not offending but I would let you now my thoughts. Please keep in mind that we better need to remove complexity from the project, not add. The code must be easy to read, understand and follow. If you want to experiment with features that are not required for the actual plugins functionality you should better use wrapper classes and do whatever you want in there.

Maybe you can create a simple, cleaned-up version in a release branch?
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on January 01, 2016, 08:00:19 pm
>> You don't provide Windows project files.
>> - a lot of serious compiler warnings that should be fixed
I'm currently downloading that "community edition 2015" thing

>>- using jump marks Non-negotiable

All the rest sounds right ( I think that since I didn't have many downloads, I felt free to digress and experiment ).

>>Maybe you can create a simple, cleaned-up version in a release branch? It is work in progress, and I shall remove also the logs and the checks in it.

>>in the current stage as the plugin is it won't make it into an official plugin That's not my final goal, I use my plugin myself and I'm happy with that, it does what I wanted. But I knew the idea was good :)
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on January 06, 2016, 08:48:51 am
Quote
BTW: You don't provide Windows project files. So many people will miss your plugin effort.
I have not used ms products since years, but I got some skills in that ; unfortunately :


I am unable to compile a vc++ ( visual studio community 2015 ) solution of my plugin :

I am unable to compile C::B@svn10631 within C::B@10631[x32-TDMgcc] with VC++ toolchain

Is codeblocks-13.12-setup.exe (http://www.codeblocks.org/downloads/26#windows) built with VC++ ? how do you do that ?

All that stuff is eating my time up ; Any tip / advice welcome
Title: Re: OpenFilesListPlus plugin
Post by: oBFusCATed on January 06, 2016, 09:01:53 am
Nope, use a tdm release of the GCC compiler.
Title: Re: OpenFilesListPlus plugin
Post by: MortenMacFly on January 06, 2016, 11:32:43 am
I am unable to compile a vc++ ( visual studio community 2015 ) solution of my plugin :
Why would you want to do that? With Windows files I mean C::B project files that compile under Windows using (TDM)/GCC, of course.

That was maybe a misunderstanding. We use GCC on Windows, too. Not VC.

Check the other plugins they usually have a FOO-unix.cbp and a FOO.cbp file. The first one is for Unix, the latter for Windows. Take this as a starter.
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on January 06, 2016, 02:24:37 pm
That was maybe a misunderstanding
Yes - Anyway, I am relieved that I shall not have to deal with msvc ( and incidentally I fixed by MOOTMGR-is-missing pb )
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on January 07, 2016, 09:52:26 pm
BTW: You don't provide Windows project files. So many people will miss your plugin effort.
Done, you can checkout the "pub" branch if you want.
- Windows targets : "Debug-ms" & "devel-ms"
- svn build still required ( unable to build against latest nightly on win, and Jens debian packages are for wx-3 )
Title: Re: OpenFilesListPlus plugin
Post by: earlgrey on January 10, 2016, 12:17:10 am
I made some binaries (https://github.com/earlgrey-bis/cb-OpenFilesListPlus/wiki/Binaries) for linux & win - feedback welcome !

Edit [2016.10.01] Links updated in wiki, there was an error : a .cbplugin filename must match the plugin's name it contains.