Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Intergrate the nativeparser_base to our parsertest project
ollydbg:
--- Quote from: MortenMacFly on July 12, 2012, 07:34:50 am ---
--- Quote from: ollydbg on July 12, 2012, 02:17:04 am ---You may not understand my idea.
--- End quote ---
...maybe I need to rre-phrase. As you see:
--- Code: --- <Unit filename="cc_test\test.h">
<Option target="<{~None~}>" />
</Unit>
--- End code ---
...although the file is in the project, it belongs to a the special target "{~None~}" which means in no target it is checked. I was under the impression hat only those files are parsed, that belong to a real target (like "default") and this file only in case it is being opened (which you don't need to do). How does CC collect its list of files to parse precisely? I'll have a look...
--- End quote ---
I think CC just add all the files belong to the project, you can see below:
--- Code: ---void NativeParser::AddProjectToParser(cbProject* project)
{
....
if (project)
{
size_t fileCount = 0;
for (FilesList::iterator it = project->GetFilesList().begin(); it != project->GetFilesList().end(); ++it)
{
ProjectFile* pf = *it;
if (pf && FileTypeOf(pf->relativeFilename) == ftHeader)
{
if (AddFileToParser(project, pf->file.GetFullPath(), parser))
++fileCount;
}
}
for (FilesList::iterator it = project->GetFilesList().begin(); it != project->GetFilesList().end(); ++it)
{
ProjectFile* pf = *it;
if (pf && FileTypeOf(pf->relativeFilename) == ftSource)
{
if (AddFileToParser(project, pf->file.GetFullPath(), parser))
fileCount++;
}
}
wxString log(F(_("Done adding %d files of project (%s) to parser."), fileCount, prj.wx_str()));
CCLogger::Get()->DebugLog(log);
}
...
--- End code ---
BTW: I noticed that in our codeblocks.cbp, there are different targets which have the save class name "Token", CodeCompletion plugin target and debugger plugin target. Click on the "Token" and context menu select goto declaration will bring me to:
--- Code: ---plugins\debuggergdb\parsewatchvalue.cpp
--- End code ---
This is pretty annoying...... :(
MortenMacFly:
--- Quote from: ollydbg on July 12, 2012, 08:45:00 am ---I think CC just add all the files belong to the project, you can see below:
[...]
--- End quote ---
Hmmm... seems you are right. But if that is a good idea... I don't know. At least we should skip files not related to any target. This would avoid the freeze you are mentioning.
BTW: I've done the directory layout changes in trunk. I merged them from the xml_compiler branch which was actually an error. I meant these 4 commits to be applied in trunk had not switched back to trunk before the first commit. ::) :-[
However - we have the history.... although its in a branch. And as it doesn't do any functional change its OK I'd say...
oBFusCATed:
--- Quote from: MortenMacFly on July 13, 2012, 09:37:28 am ---BTW: I've done the directory layout changes in trunk. I merged them from the xml_compiler branch which was actually an error. I meant these 4 commits to be applied in trunk had not switched back to trunk before the first commit.
--- End quote ---
Wow, you're using single working copy for all the branches? You're a brave man:)
MortenMacFly:
--- Quote from: oBFusCATed on July 13, 2012, 10:41:21 am ---Wow, you're using single working copy for all the branches? You're a brave man:)
--- End quote ---
You can switch only partially to a branch, like I did for the CC plugin. This is nice if the changes are related to a single directory, only. Unfortunately here, I forgot to switch this folder back to trunk before. After the first commit I realised that I had even clicked away the warning of the SVN software... maybe it was too early today. ::)
Navigation
[0] Message Index
[*] Previous page
Go to full version