Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Code Alignment Tool

(1/5) > >>

DarrenClark:
Hi.

I've just picked up Code::Blocks today and I thought I'd have a wee play with the plugin system to get me using the IDE in anger.  I've made a little plugin that aligns equals characters and C++ comments.  For example:

Before
--- Code: ---somevar1 = 1;
foo = 223;
barfoo = 12;

wibble = flibble;

squid = ferret;

/* lots of comments, doesn't matter as long as it doesn't
contain the string that's being
aligned
on
*/
--- End code ---

After (assuming you select the lines with variables on)
--- Code: ---somevar1 = 1;
foo      = 223;
barfoo   = 12;

wibble   = flibble;

squid    = ferret;

/* lots of comments, doesn't matter as long as it doesn't
contain the string that's being
aligned
on
*/
--- End code ---

Not the world's greatest plugin by far but it keeps my code aligned as I want it.

The plugin creates a new menu option "Aligner" in the context menu for an editor.  There are two options in it, align = and align //.  As soon as I can figure out how to spawn an input window then you should be able to align on any string.

I'm not sure on what needs distributing but the .cbplugin file has been renamed to .zip to get past the upload filter on the forum.

Hope somebody finds this of use.  I'm off to go and make a game now :)

All the best.



[attachment deleted by admin]

ollydbg:
I would like to download and try it!!
Thanks!!

Edit

How to use it ...???

I upzip this file, and find a .so file :(

blueshake:
I remove the extend .zip,and install from the plugin managerment,it said the *.dll is available not *.so.

ollydbg:

--- Quote from: blueshake on October 04, 2009, 07:08:09 am ---I remove the extend .zip,and install from the plugin managerment,it said the *.dll is available not *.so.

--- End quote ---
It seems this add-in can only works under Linux system. Because .so file is just like .dll file under windows.

MortenMacFly:

--- Quote from: ollydbg on October 04, 2009, 09:00:05 am ---It seems this add-in can only works under Linux system. Because .so file is just like .dll file under windows.

--- End quote ---
Yes, linux only :-(

BTW: If you rename it to *.cbplugin it should install just fine using C::B.

Any change to publish the sources, too? Sounds interesting to me...?!

Navigation

[0] Message Index

[#] Next page

Go to full version