Author Topic: Redesign  (Read 19396 times)

Offline aerea

  • Single posting newcomer
  • *
  • Posts: 5
Redesign
« on: May 17, 2009, 12:27:50 pm »
Hi all,

I would like to begin redesigning the Code Completion plugin.  I use Codeblocks frequently and find this a severely limiting feature when compared to Visual Studio (as well as the lack of support for background color options, but that's another topic).  Has anyone already began this, or would it be appreciated if I started?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6023
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Redesign
« Reply #1 on: May 17, 2009, 02:05:08 pm »
Great!
I'm happy to hear that someone want to redesign it. But it seems a bit complicated. I have write a little wiki page about the current architecture, but not sure it can help. :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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Redesign
« Reply #2 on: May 18, 2009, 08:37:55 am »
Has anyone already began this, or would it be appreciated if I started?
Not really, but internally we are already using a heavily modified version of CC. Hence this requires the wxAUI branch to work so it's not published officially. Hence any help is welcome. CC (even modified) still needs improvement. So if you are willing to work on the wxAUI branch I can provide you with the patch / modified sources.
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 aerea

  • Single posting newcomer
  • *
  • Posts: 5
Re: Redesign
« Reply #3 on: May 18, 2009, 09:20:07 am »
Alright, well, I've begun development.  I figured I'd spin in circles in the beginning since I've never done any CodeBlocks plugin development before, so I just started off as I created a library which I can link to later.

I'm starting off from scratch using ANTLR to parse the grammar.  I'm working with the C preprocessor now since I understand macros and defines are a huge shortfall.  I'll be populating a tree structure that can be walked through the GUI side.  I envision something like this:

CC has two components: A Parser and Data storage functions.  The GUI calls the CC library with a pointer to a memory buffer and pointer to store resulting tree data.  If the GUI exits, the tree data can be saved outright to a file and reopened later; if a file is changed, every file that references the changed file is reprocessed in the background.  This way, large projects only need to be parsed once.  If there is no data found on startup, n different threads will each parse the files (likely configurable).  Any other ideas?

I can tokenize the C++, but I need to actually store everything and get it to interact with the preprocessor (i.e. #ifndefs).

In cases where I can sacrifice a bit of memory for speed, I have.

Just a warning: I work full-time, so it's unlikely everything'll be done next week :-).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Redesign
« Reply #4 on: May 18, 2009, 12:30:39 pm »
/OFF

Not really, but internally we are already using a heavily modified version of CC. Hence this requires the wxAUI branch to work so it's not published officially. Hence any help is welcome. CC (even modified) still needs improvement. So if you are willing to work on the wxAUI branch I can provide you with the patch / modified sources.

Is there more info (TODO, thread, plan) about the wxAUI branch?

/OFF
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Redesign
« Reply #5 on: May 18, 2009, 01:10:25 pm »
Is there more info (TODO, thread, plan) about the wxAUI branch?
Not really.
In fact will discuss when exactly we do the merge as this affects the SDK and thus s proper release heavily.
The general plan is to merge as soon as the branch becomes stable (which it is IMHO) and tested intensively by many users. That's the current bottleneck: Not all devs do work with this branch so we are just careful with merging.
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 Dr.Optix

  • Multiple posting newcomer
  • *
  • Posts: 30
  • I'm studying OS Developing.
    • DrOptix Blog
Re: Redesign
« Reply #6 on: June 09, 2009, 09:52:10 pm »
I just got the latest C::B SVN and successfully built it, I'm gona try some mods for the CodeCompletion so that it parse templates but other situations in a right way. If I'll be able to come up with something I will release a patch for jens or other dev to test and maybe commit it.

~Dr.Optix
Occupation: Hobby Programmer
IDE: Code::Blocks Nightly / CodeLite Latest Stable
Compiler: TDM's GCC/mingw32
Blog: DrOptix.WordPress.Com

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Redesign
« Reply #7 on: June 10, 2009, 06:56:51 am »
I'm gona try some mods for the CodeCompletion so that it parse templates but other situations in a right way.
Be careful: There is already some work done. please check the patch tracker before you start implementing the wheel twice... ;-)
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 Dr.Optix

  • Multiple posting newcomer
  • *
  • Posts: 30
  • I'm studying OS Developing.
    • DrOptix Blog
Re: Redesign
« Reply #8 on: June 10, 2009, 10:22:18 am »
I'm gona try some mods for the CodeCompletion so that it parse templates but other situations in a right way.
Be careful: There is already some work done. please check the patch tracker before you start implementing the wheel twice... ;-)

Understood Morten :)
Occupation: Hobby Programmer
IDE: Code::Blocks Nightly / CodeLite Latest Stable
Compiler: TDM's GCC/mingw32
Blog: DrOptix.WordPress.Com

Offline Dr.Optix

  • Multiple posting newcomer
  • *
  • Posts: 30
  • I'm studying OS Developing.
    • DrOptix Blog
Re: Redesign
« Reply #9 on: June 10, 2009, 03:03:11 pm »
Checked patch list on BerliOS and as i can see [ Patch #2624 ] Code completion improvement.

Is complete CodeCopletion. I'm gona test it with anonymous structs, nested structs templates and other stuff that cause trouble in current version from trunk

http://developer.berlios.de/patch/?func=detailpatch&patch_id=2624&group_id=5358

Also adding patches with Tortoise SVN make me say rage when itshout that there are conflict between current trunk and the patch, it seems that i still need to learn about SVN but more how SVN patches are created
« Last Edit: June 10, 2009, 03:10:59 pm by Dr.Optix »
Occupation: Hobby Programmer
IDE: Code::Blocks Nightly / CodeLite Latest Stable
Compiler: TDM's GCC/mingw32
Blog: DrOptix.WordPress.Com

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6023
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Redesign
« Reply #10 on: June 10, 2009, 03:11:08 pm »
Is complete CodeCopletion. I'm gona test it with anonymous structs, nested structs templates and other stuff that cause trouble in current version from trunk
Sorry, I can't fully understand the meaning of "Is complete CodeCompletion" ?

AFAIK, in that patch you mentioned, the author add many stuffs such as "sort" the list entry, also many context menu item was added. But nothing to do with parsing templates.
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.