Relatively massive C++ parser and Assist++ refactoring...

git-svn-id: svn://ultimatepp.org/upp/trunk@510 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-10-05 21:36:04 +00:00
parent 5806a3f0f2
commit 3ed63a1352
25 changed files with 718 additions and 791 deletions

View file

@ -5,20 +5,15 @@ void AssistEditor::Annotate(const String& filename)
int fi = GetCppFileIndex(filename);
CppBase& base = BrowserBase();
for(int j = 0; j < base.GetCount(); j++) {
CppNest& nest = base[j];
for(int k = 0; k < nest.GetCount(); k++) {
CppItem& m = nest.item[k];
for(int p = 0; p < m.pos.GetCount(); p++) {
if(m.pos[p].file == fi) {
String coderef = base.GetKey(j);
if(coderef.GetCount())
coderef << "::";
coderef << nest.key[k];
SetAnnotation(m.pos[p].line - 1,
GetRefLinks(coderef).GetCount() ? IdeImg::tpp_doc()
: IdeImg::tpp_pen(),
coderef);
}
const Array<CppItem>& n = base[j];
for(int k = 0; k < n.GetCount(); k++) {
const CppItem& m = n[k];
if(m.file == fi) {
String coderef = MakeCodeRef(base.GetKey(j), m.qitem);
SetAnnotation(m.line - 1,
GetRefLinks(coderef).GetCount() ? IdeImg::tpp_doc()
: IdeImg::tpp_pen(),
coderef);
}
}
}