News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

[SOLVED]Code Completion in toolbar

Started by qtreez, March 01, 2015, 01:44:06 PM

Previous topic - Next topic

qtreez

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.


ollydbg

Quote from: 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.
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, so this bug don't get lost. It will simply get lost in our forum. Thank you!
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.

qtreez

#2
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:
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
    *
    *
    *
wxEND_EVENT_TABLE()


Workaround is put it at the end of source file.

ollydbg

I tested, and works fine here, but I have

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:

BEGIN_EVENT_TABLE ->  -END_EVENT_TABLE

So, you may need to have

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.
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.

qtreez

This and reparsing project solve my problem.
Thanks :)