Author Topic: Code Alignment Tool  (Read 20713 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code Alignment Tool
« Reply #15 on: December 09, 2009, 06:00:42 am »
A friend of mine changed the Aligner plugin:
  • don't add a newline at the end of a "new aligned" block
  • possibility to add other chars/strings to align to
  • store/load the most used chars/strings in the config.


Thanks!!!

should do changes in two places to let it build successfully under MinGW.

First, the include path should be

..\..\..\include\wxscintilla\include


second

In line 245 of Aliger.cpp, the statement should be
Code: [Select]
control->SetSelection(pos_start, pos_end);
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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Code Alignment Tool
« Reply #16 on: December 09, 2009, 06:28:23 am »
First, the include path should be
..\..\..\include\wxscintilla\include
[...]
Code: [Select]
control->SetSelection(pos_start, pos_end);
Notice that he seems to use the scintilla branch. There it is correct as the include path has moved and the method call, too.
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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5223
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code Alignment Tool
« Reply #17 on: December 09, 2009, 06:38:11 am »
Thanks for the hint. I noticed that there are two branches currently been developed.

One is
svn://svn.berlios.de/codeblocks/branches/wxpropgrid_debugger

and the other is
svn://svn.berlios.de/codeblocks/branches/scintilla

 :D
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 danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 202
Re: Code Alignment Tool
« Reply #18 on: December 09, 2009, 10:57:38 pm »
I have one futher improvement:
In Aligner.cpp replace both
Code: [Select]
find_first_of by
Code: [Select]
Find so it will search for the whole string to align to(not only the first char).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Code Alignment Tool
« Reply #19 on: December 17, 2009, 07:58:34 am »
Any chances that this may migrated into the EditorTweaks plugin (see here: http://forums.codeblocks.org/index.php/topic,11540.msg79486/topicseen.html#msg79486)???
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

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Code Alignment Tool
« Reply #20 on: April 29, 2010, 05:57:57 am »
Any chances that this may migrated into the EditorTweaks plugin (see here: http://forums.codeblocks.org/index.php/topic,11540.msg79486/topicseen.html#msg79486)???

danselmi gave me a patch for the EditorTweaks plugin to include this feature. I've already committed the code and plan to add danselmi and DarrenClark to the list of authors (unless someone tells me otherwise).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Code Alignment Tool
« Reply #21 on: April 29, 2010, 06:25:22 am »
I've already committed the code and plan to add danselmi and DarrenClark to the list of authors (unless someone tells me otherwise).
Excellent. Good news. :-)
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