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

Patch: function arguments added to autocomplete tooltip

<< < (17/24) > >>

p2rkw:
I know that, but I don't know will I have time in this week.

MortenMacFly:

--- Quote from: p2rkw on January 07, 2013, 12:24:14 am ---Next update, now all newly added functionalities are disabled by default. To enable them you have modify your config file manually.

--- End quote ---
Unfortunately it doesn't compile. The error I get is:
C:\Devel\CodeBlocks\src\plugins\codecompletion\parser\parserthread.cpp: In constructor 'ParserThread::ParserThread(ParserBase*, const wxString&, bool, ParserThreadOptions&, TokenTree*)':
C:\Devel\CodeBlocks\src\plugins\codecompletion\parser\parserthread.cpp:200:72: error: no matching function for call to 'Tokenizer::SetTokenizerOption(bool&)'
You changed the interface of that method from:
void SetTokenizerOption(bool wantPreprocessor)
...to:
void SetTokenizerOption(bool wantPreprocessor, bool storeDocumentation)
...maybe you forgot to update all its calls / references?

p2rkw:
Oh, sorry. I cut out too much when I was removing unnecessary chunks from patch.
You can use revised patch (in attachment) or apply this:

--- Code: ---Index: src/plugins/codecompletion/parser/parserthread.cpp
===================================================================
--- src/plugins/codecompletion/parser/parserthread.cpp (wersja 8771)
+++ src/plugins/codecompletion/parser/parserthread.cpp (kopia robocza)
@@ -197,7 +197,8 @@
     m_IsBuffer(parserThreadOptions.useBuffer),
     m_Buffer(bufferOrFilename)
 {
-    m_Tokenizer.SetTokenizerOption(parserThreadOptions.wantPreprocessor);
+    bool storeDocumentation = true;
+    m_Tokenizer.SetTokenizerOption(parserThreadOptions.wantPreprocessor, storeDocumentation);
     if (!m_TokenTree)
         cbThrow(_T("m_TokenTree is a nullptr?!"));
 }
--- End code ---

MortenMacFly:

--- Quote from: p2rkw on January 07, 2013, 06:33:07 pm ---You can use revised patch (in attachment) or apply this:

--- End quote ---
Yes, work now... I have it applied and report if something is badly broken... ;-)

ollydbg:
I have a wired build issue:

--- Quote ---[ 58.3%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE  -DBUILDING_PLUGIN    -iquote.objs\include -I.objs\include -I. -IE:\code\cb\wx\wxWidgets-2.8.12\include -IE:\code\cb\wx\wxWidgets-2.8.12\contrib\include -IE:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue  -c plugins\codecompletion\codecompletion.cpp -o .objs\plugins\codecompletion\codecompletion.o
In file included from plugins\codecompletion\codecompletion.h:17:0,
                 from plugins\codecompletion\codecompletion.cpp:53:
plugins\codecompletion\doxygen_parser.h:181:9: error: expected identifier before numeric constant
plugins\codecompletion\doxygen_parser.h:181:9: error: expected '}' before numeric constant
plugins\codecompletion\doxygen_parser.h:181:9: error: expected unqualified-id before numeric constant
plugins\codecompletion\doxygen_parser.h:197:37: error: 'Command' was not declared in this scope
plugins\codecompletion\doxygen_parser.h:197:50: error: expected primary-expression before 'const'
plugins\codecompletion\doxygen_parser.h:197:72: error: expected primary-expression before 'const'
plugins\codecompletion\doxygen_parser.h:199:40: error: 'Command' was not declared in this scope
plugins\codecompletion\doxygen_parser.h:199:53: error: expected primary-expression before 'const'
plugins\codecompletion\doxygen_parser.h:199:75: error: expected primary-expression before 'int'
plugins\codecompletion\doxygen_parser.h:201:12: error: 'Command' does not name a type
plugins\codecompletion\doxygen_parser.h:207:27: error: uninitialized const 'separatorTag' [-fpermissive]
plugins\codecompletion\doxygen_parser.h:211:39: error: expected ')' before '*' token
plugins\codecompletion\doxygen_parser.h:213:27: error: expected constructor, destructor, or type conversion before ';' token
plugins\codecompletion\doxygen_parser.h:229:23: error: non-member function 'bool IsAttached()' cannot have cv-qualifier
plugins\codecompletion\doxygen_parser.h:235:1: error: expected unqualified-id before 'protected'
plugins\codecompletion\doxygen_parser.h:251:1: error: expected unqualified-id before 'public'
plugins\codecompletion\doxygen_parser.h:259:1: error: expected unqualified-id before 'protected'
plugins\codecompletion\doxygen_parser.h:284:5: error: expected unqualified-id before 'private'
plugins\codecompletion\doxygen_parser.h:284:5: error: expected unqualified-id before 'protected'
plugins\codecompletion\doxygen_parser.h:284:5: error: 'virtual' outside class declaration
plugins\codecompletion\doxygen_parser.h:284:5: error: non-member function 'const wxEventTable* GetEventTable()' cannot have cv-qualifier
plugins\codecompletion\doxygen_parser.h:284:5: error: no matching function for call to 'wxEventHashTable::wxEventHashTable()'
plugins\codecompletion\doxygen_parser.h:284:5: note: candidates are:
E:\code\cb\wx\wxWidgets-2.8.12\include/wx/event.h:2380:5: note: wxEventHashTable::wxEventHashTable(const wxEventHashTable&)
E:\code\cb\wx\wxWidgets-2.8.12\include/wx/event.h:2380:5: note:   candidate expects 1 argument, 0 provided
E:\code\cb\wx\wxWidgets-2.8.12\include/wx/event.h:2342:5: note: wxEventHashTable::wxEventHashTable(const wxEventTable&)
E:\code\cb\wx\wxWidgets-2.8.12\include/wx/event.h:2342:5: note:   candidate expects 1 argument, 0 provided
plugins\codecompletion\doxygen_parser.h:284:5: error: 'virtual' outside class declaration
plugins\codecompletion\doxygen_parser.h:284:5: error: non-member function 'wxEventHashTable& GetEventHashTable()' cannot have cv-qualifier
plugins\codecompletion\doxygen_parser.h:285:1: error: expected declaration before '}' token

--- End quote ---

The first error happens here:

--- Code: ---class DocumentationHelper : public /*wxHtmlWindow*/ wxEvtHandler
{
    //typedef wxHtmlWindow BaseClass;
    typedef wxEvtHandler BaseClass;

public:
    enum Command
    {
        NO_COMMAND,
        DISPLAY_TOKEN,  //args: token index
        SEARCH,         //args: token name
        SEARCH_ALL,     //args: token name **************Here
        OPEN_DECL,      //args: token index
        OPEN_IMPL,      //args: token index
        CLOSE,          //args: -----
    };

--- End code ---

I just run the preprocessor:

--- Quote ---@echo Add MinGW path
@set PATH=E:\code\gcc\PCXMinGW463\bin;%PATH%

g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE  -DBUILDING_PLUGIN    -iquote.objs\include -I.objs\include -I. -IE:\code\cb\wx\wxWidgets-2.8.12\include -IE:\code\cb\wx\wxWidgets-2.8.12\contrib\include -IE:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue  -E plugins\codecompletion\codecompletion.cpp >> a.txt

--- End quote ---

The wired thing is, when I look at the a.txt(the preprocessed output), I see such code:

--- Code: ---class DocumentationHelper : public wxEvtHandler
{

    typedef wxEvtHandler BaseClass;

public:
    enum Command
    {
        NO_COMMAND,
        DISPLAY_TOKEN,
        SEARCH,
        0x0,
        OPEN_DECL,
        OPEN_IMPL,
        CLOSE,
    };

--- End code ---

I don't know where the "0x0" comes???? I just searched the whole file, and I see no macro definition of "SEARCH_ALL". I have no idea what happens.....

EDIT:
It looks like I can add such code to avoid the issue.

--- Code: ---#ifdef SEARCH_ALL
#undef SEARCH_ALL
#endif

--- End code ---
But I still have no idea where does the previous "SEARCH_ALL" defined.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version