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 )
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.
Quote from: 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.
-> My work for this week.
Quote from: oBFusCATed on September 27, 2015, 05:28:28 PM
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
Quote from: oBFusCATed on September 27, 2015, 05:28:28 PM
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
Quote from: earlgrey on September 27, 2015, 05:42:22 PM
Quote from: oBFusCATed on September 27, 2015, 05:28:28 PM
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?
I group class functionalities by ".hhi" and ".cci" file.
- I dont waste time searching in too big files
- when I get too much ".hhi" & ".cci" files I create other classes :for example, at a moment, the OpenFilesListPlus class went overweighted, so I created the OflpModxxx classes, leaving only the event handlers and the cbPlugin stuff in OpenFileListPlus class
And it avoids me too many paste & copy of things like this :
#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,
- 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 ?
Quote from: earlgrey on October 05, 2015, 06:23:50 PM
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?
Quote from: ollydbg on October 06, 2015, 08:23:36 AM
What memory leaks do you have?
I dont know, I m searching for them
Quote from: ollydbg on October 06, 2015, 08:23:36 AM
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 -
If you're on linux you can try the address sanitizers. I think they can report memory leaks, but I'm not 100% sure.
I'm on my way to write a minimalistic fake codeblocks sdk for my plugin.
Quote from: 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 )
how insttal it
Quote from: Abdulqayoom on December 22, 2015, 05:19:02 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)
Quote from: 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.
I' ve done that, but gcc 4.9.2 define the two macros linux and unix
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 :
@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
You need to pass -ansi to the compiler or switch to c++11/14.
Quote from: earlgrey on September 27, 2015, 05:14:37 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.
Quote from: MortenMacFly on January 01, 2016, 05:00:09 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?
>> 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 :)
QuoteBTW: 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 :
- wxWidgets-2.8.12-rc2 related unresolved external
- virtual wxDragResult wxDataObject::OnData (wxCoord x, wxCoord y, wxDragResult defResult)=0
Calling convention / some compilation option between plugin and wxWidgets dll ? I tried with x32-TDMgcc .lib and x32-VC++ .lib
- codeblocks unresolved externals
- All functions
using C::B@svn10631 codeblocks.lib created from C::B@svn10631[x32-TDMgcc] codeblocks.dll with dlltool
- I have to modify C::B sources
- prep.h : std::nullptr_t already defined
- prep.h : #include <memory> instead of #include <tr1/memory>
I am unable to compile C::B@svn10631 within C::B@10631[x32-TDMgcc] with VC++ toolchain
- core incompatibility
- somefile.h : #include <sys/time.h> is unix specific
something has to be configured somewhere ?
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
Nope, use a tdm release of the GCC compiler.
Quote from: earlgrey on January 06, 2016, 08:48:51 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.
Quote from: MortenMacFly on January 06, 2016, 11:32:43 AM
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 )
Quote from: MortenMacFly on January 01, 2016, 05:00:09 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 )
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.