Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Intergrate the nativeparser_base to our parsertest project

<< < (5/7) > >>

ollydbg:

--- Quote from: ollydbg on July 08, 2012, 03:30:08 pm ---
To solve the problem stated here:Re: CodeCompletion wxWidgets, we need to solve below:

--- Code: ---class wxWindow
{
     int aaaaa;
};


// The template parameter W must be a wxWindow-derived class.
template <class W>
class wxNavigationEnabled : public W
{
public:
    typedef W BaseWindowClass;
};


class wxPanelBase : public wxNavigationEnabled<wxWindow>
{

};

wxPanelBase ccccc;


--- End code ---
Statement:

--- Code: ---ccccc.aaaaa;
--- End code ---



--- End quote ---

I implement this a bit, it at least works in some simple cases. (only works on template with only one ancestor with is actually the formal template argument)

See the image shown when I try to find the declaration of the function: SetFocus(). In a wx2.9.x project.



ollydbg:
@Morten:
I think that the parsertest project should make as simple as possible, so I'm planning to remove the "codeblocks.dll" dependency, also, I think cbStyleTextCtrl is not necessary. :)

My plan is:
One file for test parsing(test.h)

--- Code: ---class wxWindow
{
     int aaaaa;
};


// The template parameter W must be a wxWindow-derived class.
template <class W>
class wxNavigationEnabled : public W
{
public:
    typedef W BaseWindowClass;
};


class wxPanelBase : public wxNavigationEnabled<wxWindow>
{

};

wxPanelBase ccccc;

--- End code ---
and one file for test resolving expression(test_expression.exp)
The expression file can contains something like:

--- Code: ---expression:
ccccc.aaaaa
expected result:
variable int wxWindow::aaaaa
--- End code ---

The only issue is that it can only test expression from "global namespace". ;) But I think it was just enough good if we have many testing files. Introducing the class cbStyleTextCtrl was just trying to find the which function the cursor was located in.


 

MortenMacFly:

--- Quote from: ollydbg on July 11, 2012, 05:37:33 am ---also, I think cbStyleTextCtrl is not necessary. :)

--- End quote ---
But in that case we cannot test all functions related to NativeParser (CC in general), like the whole AI. I don't know if that's a good idea. My plan was in the direction to provide the parser test project with a simple (maybe hidden and/or abstract) cbStyledTextCtrl which allows to test the AI, too.

ollydbg:

--- Quote from: MortenMacFly on July 11, 2012, 06:45:42 am ---
--- Quote from: ollydbg on July 11, 2012, 05:37:33 am ---also, I think cbStyleTextCtrl is not necessary. :)

--- End quote ---
But in that case we cannot test all functions related to NativeParser (CC in general), like the whole AI. I don't know if that's a good idea. My plan was in the direction to provide the parser test project with a simple (maybe hidden and/or abstract) cbStyledTextCtrl which allows to test the AI, too.

--- End quote ---
I just give up on "removing the "codeblocks.dll" dependency", it was too complex and need a lot of code changes. :(
Maybe, you are right, we will use "cbStyledTextCtrl" some days later. :)

MortenMacFly:

--- Quote from: ollydbg on July 11, 2012, 11:02:08 am ---Maybe, you are right, we will use "cbStyledTextCtrl" some days later. :)

--- End quote ---
Probably... :-)

BTW: I am thinking of a directory structure as attached. It is an archive of the new/moved files without (!) the files that did not change. It incorporates all the work you had provided with cc_patch2. I renamed "parsertest" to "cc_test" and in the end we want to test CC, not only the parser. Have a look at the "tree.txt" file which shows the complete directory structure for reference. As I said: The files missing in the archive are the same as in SVN.

Would that be a good thing to do?

[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version