News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to add additional search paths to code completion parser with wizard

Started by riban, December 16, 2017, 12:18:27 AM

Previous topic - Next topic

riban

I am writing a new project wizard to create a C++ project for the Sming (ESP8266) framework. I would like to add search paths to the project properties C/C++ parser options so that auto complete works for the Sming library functions. I see that this is stored in the <Project><Extensions><code_completion> section of the project file but I cannot figure out how to add paths using wizard scripting.

I have this working using the simple template method but that is not as user friendly, hence my desire to use a wizard.

oBFusCATed

You could probably use the void cbProject::AddToExtensions(const wxString& stringDesc) method.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

riban

I cannot find any description of what syntax the argument should be for AddToExtensions(wxString). I would need to pass the extension (code_completion) and the data which in the project file is an XML tag with attribute, e.g. <search_path add="my_include_path" />).

riban

I have found this in the source code of cbproject.cpp:

// sample stringDesc:
// node/+subnode/subsubnode:attr=val


So I have tried adding this to my wizard:

project.AddToExtensions(_T("code_completion/+search_path:add=include_path"));


But this does not work. Any clues?

BlueHazzard


riban

I have added a ticket #584 for this to the issue tracking system. Looking at the source code I can't figure out why this isn't working in 16.01 and latest nightly (on Windows 7).