Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: qtreez on March 01, 2015, 01:44:06 pm

Title: [SOLVED]Code Completion in toolbar
Post by: qtreez on March 01, 2015, 01:44:06 pm
Hi.
My problem is that the plugin "Code Completion" in toolbar is not working properly. Not all methods are listed. But in Symbols tab in Management pane there are. This applies to a class that inherits from wxFrame (I use the wxWidgets framework). In my own class (not inherit) the problem does not occur.
This screenshot illustrate what I wanted to convey.

Title: Re: Code Completion in toolbar
Post by: ollydbg on March 01, 2015, 03:05:16 pm
Hi.
My problem is that the plugin "Code Completion" in toolbar is not working properly. Not all methods are listed. But in Symbols tab in Management pane there are. This applies to a class that inherits from wxFrame (I use the wxWidgets framework). In my own class (not inherit) the problem does not occur.
This screenshot illustrate what I wanted to convey.
From the image shot, I see it is a bug.
I know that CodeCompletion plugin use two different ways to generate the items in toolbar and symbol browser tree. But I'm not quite understand those mechanism, so I won't help much to solve this problem soon. Sorry.
Maybe, you can file a bug report here: Tickets (https://sourceforge.net/p/codeblocks/tickets/?source=navbar), so this bug don't get lost. It will simply get lost in our forum. Thank you!
Title: Re: Code Completion in toolbar
Post by: qtreez on March 01, 2015, 03:26:28 pm
Now also noticed that the implementation of "the symbol browser tree" also has bugs. Context menu does not have the "Jump to implementation 'button. Only Jump to declaration. This applies to the same case about which I wrote in the first post.

The culprit is the stuff:
Code
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
    *
    *
    *
wxEND_EVENT_TABLE()

Workaround is put it at the end of source file.
Title: Re: Code Completion in toolbar
Post by: ollydbg on March 01, 2015, 04:07:26 pm
I tested, and works fine here, but I have
Code
BEGIN_EVENT_TABLE(wx3_hangFrame,wxFrame)
...
END_EVENT_TABLE()
You may need to add some custom replace rules in CodeCompletion plugin setting dialog. I have:
Code
BEGIN_EVENT_TABLE ->  -END_EVENT_TABLE
So, you may need to have
Code
wxBEGIN_EVENT_TABLE -> -wxEND_EVENT_TABLE
Our parser just skip those blocks.

BTW: In the future, those manually replace rules will be totally removed, see discussion: Macro expansion infinite loop. (http://forums.codeblocks.org/index.php/topic,19791.0.html)
Title: Re: Code Completion in toolbar
Post by: qtreez on March 01, 2015, 04:38:22 pm
This and reparsing project solve my problem.
Thanks :)