Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
New code completion remarks/issues
ollydbg:
--- Quote from: blueshake on September 23, 2009, 03:55:39 pm ---hello,did anyboby notice that codecompletion bar that miss some function in codecompletion.cpp.
see my snap3 .I can confirm that it work at rev 5731 see the snap4 .
it seems that the codecompletion's member function were not included in this situation.what is going on ?
--- End quote ---
Hi, I can confirm this bug in my local copy(based on rev 5816). :D
Investigating now!
ollydbg:
I think I have locate the bug. See the image below.
It seems the function before the current scope was shown.
So, the parser may fails parsing this function, especially "//" or "\\".
--- Code: ---wxArrayString GetIncludeDirs(cbProject &project)
{
wxArrayString dirs;
{
wxArrayString target_dirs = project.GetIncludeDirs();
for(size_t ii = 0; ii < target_dirs.GetCount(); ++ii)
{
wxFileName filename;
NormalizePath(filename, target_dirs[ii]);
wxString fullname = filename.GetFullPath();
fullname.Replace(_T("\\"), _T("/"), true);
if(dirs.Index(fullname) == wxNOT_FOUND)
dirs.Add(fullname);
}
}
wxString target_name = project.GetActiveBuildTarget();
ProjectBuildTarget *target = project.GetBuildTarget(target_name);
if(target)
{
wxArrayString target_dirs = target->GetIncludeDirs();
for(size_t ii = 0; ii < target_dirs.GetCount(); ++ii)
{
wxFileName filename;
NormalizePath(filename, target_dirs[ii]);
wxString fullname = filename.GetFullPath();
fullname.Replace(_T("\\"), _T("/"), true);
if(dirs.Index(fullname) == wxNOT_FOUND)
dirs.Add(fullname);
}
}
return dirs;
}
--- End code ---
blueshake:
@ollydbg
can you provide the patch?
I believe there is some connection among reply #19,20,21.if this issue can be solved,
others wil too.
killerbot:
--- Quote from: blueshake on September 24, 2009, 05:07:20 am ---hello,Morten
goog news: :D
the issue killerbot report can be solved by this patch.
bad news:
can not make a clear explaination here.
--- Code: ---Index: src/plugins/codecompletion/parser/parserthread.cpp
===================================================================
--- src/plugins/codecompletion/parser/parserthread.cpp (revision 5816)
+++ src/plugins/codecompletion/parser/parserthread.cpp (working copy)
@@ -1051,7 +1051,11 @@
if (ns == ParserConsts::opbrace)
{
// parse inside anonymous namespace
+ Token* lastParent = m_pLastParent;
+ TokenScope lastScope = m_LastScope;
DoParse();
+ m_pLastParent = lastParent;
+ m_LastScope = lastScope;
}
else
{
--- End code ---
--- End quote ---
YES, I can confirm this works now !!!
ollydbg:
--- Quote from: blueshake on September 24, 2009, 08:01:54 am ---@ollydbg
can you provide the patch?
I believe there is some connection among reply #19,20,21.if this issue can be solved,
others wil too.
--- End quote ---
I can't figure out yet till now :(
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version