Author Topic: Class browser reengineering (stage 1)  (Read 9450 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Class browser reengineering (stage 1)
« on: July 05, 2007, 03:46:52 am »
If you want to test my experimental version of Code::Blocks, with a class browser revamp, here's the subversion url:


https://svn.berlios.de/svnroot/repos/codeblocks/branches/rick_s_playground/src/

Today's revision changed the ClassBrowserBuilderThread with a ClassBrowserBuilder object running in the main thread.  It runs in the background with the power of wxTimer ;-). It works, but it's not completed yet, I need to handle the addition of nodes (right now it runs in a single step, stalling C::B for around 3 seconds). However, you can notice that when you switch in the symbols tab from "Project Files" to "Current File", the removal of nodes in the tree is nearly instantaneous :)

Feel free to post your comments.
« Last Edit: July 05, 2007, 04:16:01 am by rickg22 »

mariocup

  • Guest
Re: Class browser reengineering (stage 1)
« Reply #1 on: July 05, 2007, 01:16:10 pm »
Hi Rickg,

I tried the plugin under windows and switching to the different views in the symbol browser is quite fast. I will test the system within the next days.

Which version of gcc do you use under windows. I have problems building the system with linux and gcc 4.0.2 issues an error (line 34) when building the classbrowser.cpp. I removed the dir sources under linux, so I do not remember the exact error message (Sorry).

Codeblocks does not support parsing of typedef structs and unions

Code
typedef struct 
{
   int Temp;
} Data_t;

Data_t Data;

Will the parsing be supported with the new class browser (final stage)  :)

Bye,

Mario

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Class browser reengineering (stage 1)
« Reply #2 on: July 05, 2007, 09:42:57 pm »
I'm using gcc 3.4.5.  Anyway, please try compiling again, I'd like to see that error code.

Quote
Will the parsing be supported with the new class browser (final stage)  Smile

Hey, hey... take it easy. I'm just redesigning a MINOR PART of code completion.

After that, I'll revamp the memory handling and the parserthread model to separate the parsing from the token handling. Then i may switch to a database model, and FINALLY... I'll revamp the parser - if i can :P - . One possibility is using CTAGS, but that's long-term.

mariocup

  • Guest
Re: Class browser reengineering (stage 1)
« Reply #3 on: July 06, 2007, 10:51:45 am »
Hi Rickg,

I get the following error under linux and gcc 4.0.2. I modified the original Makefile.am after a configure and include classbrowser.cpp,h instead of classbrowserthread.* and statemachinehelper.h.
The gcc issuses the following error:

classbrowserbuilder.cpp:34: error: explicit specialization of 'void StateMachineData<ClassBrowserBuilderAuxData>::CopyFrom(const ClassBrowserBuilderAuxData&)' must be introduced by 'template <>'
classbrowserbuilder.cpp:34: error: template-id 'CopyFrom<>' for 'void StateMachineData<ClassBrowserBuilderAuxData>::CopyFrom(const ClassBrowserBuilderAuxData&)' does not match any template declaration
classbrowserbuilder.cpp:34: error: invalid function declaration
classbrowserbuilder.cpp:43: error: explicit specialization of 'void StateMachineData<ClassBrowserBuilderAuxData>::CopyTo(ClassBrowserBuilderAuxData&)' must be introduced by 'template <>'
classbrowserbuilder.cpp:43: error: template-id 'CopyTo<>' for 'void StateMachineData<ClassBrowserBuilderAuxData>::CopyTo(ClassBrowserBuilderAuxData&)' does not match any template declaration
classbrowserbuilder.cpp:43: error: invalid function declaration

Regards,

Mario

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Class browser reengineering (stage 1)
« Reply #4 on: July 06, 2007, 05:34:38 pm »
Mario: It seems this is an issue with GCC 4. Anyway, you can help me here. Try to add "template<>" before those function declarations and tell me if it compiles. If it does, I'll try modifying the code with my version.
« Last Edit: July 06, 2007, 05:37:18 pm by rickg22 »