| 1 |
#include "stdafx.h" |
|---|
| 2 |
#include "parsingfunctions.h" |
|---|
| 3 |
|
|---|
| 4 |
int GetImageNumber(SymbolListing* l) |
|---|
| 5 |
{ |
|---|
| 6 |
|
|---|
| 7 |
if ( l ) |
|---|
| 8 |
{ |
|---|
| 9 |
switch ( l->type) |
|---|
| 10 |
{ |
|---|
| 11 |
case D_FUNCTION : return 13; |
|---|
| 12 |
case D_GLOBAL_FUNCTION: return 13; |
|---|
| 13 |
case D_CLASS : return 3; |
|---|
| 14 |
case D_INTERFACE: return 1; |
|---|
| 15 |
case D_STRUCT: return 2; |
|---|
| 16 |
case D_STATICCTOR: return 9; |
|---|
| 17 |
case D_STATICDTOR: return 12; |
|---|
| 18 |
case D_ENUM : return 5; |
|---|
| 19 |
case D_TEMPLATE : return 15; |
|---|
| 20 |
case D_VARIABLE : return 10; |
|---|
| 21 |
case D_ALIAS : return 8; |
|---|
| 22 |
case D_TYPEDEF : return 9; |
|---|
| 23 |
case D_DEBUG : return 6; |
|---|
| 24 |
case D_INVARIANT: return 6; |
|---|
| 25 |
case D_UNION : return 5; |
|---|
| 26 |
case D_UNITTEST : return 6; |
|---|
| 27 |
case D_VERSION : return 6; |
|---|
| 28 |
case D_MIXIN : return 15; |
|---|
| 29 |
} |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
return 6; |
|---|
| 35 |
|
|---|
| 36 |
} |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
void ClearCodeTreeCtrl() |
|---|
| 40 |
{ |
|---|
| 41 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 42 |
if ( f ) { |
|---|
| 43 |
|
|---|
| 44 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 45 |
//Somehow messing it up ?? |
|---|
| 46 |
if ( tree->GetCount() > 100 ) |
|---|
| 47 |
{ |
|---|
| 48 |
tree->SetRedraw(false); |
|---|
| 49 |
tree->DeleteAllItems(); |
|---|
| 50 |
tree->SetRedraw(true); |
|---|
| 51 |
} |
|---|
| 52 |
else tree->DeleteAllItems(); |
|---|
| 53 |
|
|---|
| 54 |
} |
|---|
| 55 |
|
|---|
| 56 |
} |
|---|
| 57 |
|
|---|
| 58 |
// |
|---|
| 59 |
// |
|---|
| 60 |
//void CCodeBrowsingTreeCtrl::ShowListings() |
|---|
| 61 |
//{ |
|---|
| 62 |
// |
|---|
| 63 |
// string parms, retType; |
|---|
| 64 |
// |
|---|
| 65 |
// for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 66 |
// { |
|---|
| 67 |
// if ( listings[i]->type == D_GLOBAL_FUNCTION || listings[i]->type == D_FUNCTION ) |
|---|
| 68 |
// { |
|---|
| 69 |
// |
|---|
| 70 |
// if ( Globals::proxyParser->projectParser->display.parseFunctionForDisplay((FuncDeclaration*)listings[i]->sym,parms,retType) ) |
|---|
| 71 |
// { |
|---|
| 72 |
// string ins = retType + " " + listings[i]->name + " " + parms; |
|---|
| 73 |
// InsertItem(ins.c_str(),0,0); |
|---|
| 74 |
// } |
|---|
| 75 |
// else InsertItem(string("void " + listings[i]->name).c_str(),0,0); |
|---|
| 76 |
// |
|---|
| 77 |
// |
|---|
| 78 |
// } |
|---|
| 79 |
// |
|---|
| 80 |
// else { |
|---|
| 81 |
// |
|---|
| 82 |
// |
|---|
| 83 |
// |
|---|
| 84 |
// } |
|---|
| 85 |
// |
|---|
| 86 |
// } |
|---|
| 87 |
//} |
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
void DisplayModules() { |
|---|
| 91 |
|
|---|
| 92 |
std::map<Module*,HTREEITEM> moduleMap; |
|---|
| 93 |
|
|---|
| 94 |
ClearCodeTreeCtrl(); |
|---|
| 95 |
if ( Globals::proxyParser->projectParser ) { |
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
vector<ClassListing*> classes = Globals::proxyParser->projectParser->getClasses(); |
|---|
| 99 |
|
|---|
| 100 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 101 |
if ( f ) { |
|---|
| 102 |
|
|---|
| 103 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 104 |
|
|---|
| 105 |
int i = 0; |
|---|
| 106 |
|
|---|
| 107 |
for ( i = 0; i < Globals::proxyParser->projectParser->modules.size();i++ ) |
|---|
| 108 |
{ |
|---|
| 109 |
|
|---|
| 110 |
if ( Globals::proxyParser->projectParser->modules[i]->md) |
|---|
| 111 |
{ |
|---|
| 112 |
/*AfxMessageBox(Globals::proxyParser->projectParser->modules[i]->srcfile->toChars());*/ |
|---|
| 113 |
string key = Globals::proxyParser->projectParser->modules[i]->md->toChars(); |
|---|
| 114 |
HTREEITEM item = tree->InsertItem(key.c_str(),0,0); |
|---|
| 115 |
tree->SetItemData(item,(DWORD)Globals::proxyParser->projectParser->modules[i] ); |
|---|
| 116 |
moduleMap[Globals::proxyParser->projectParser->modules[i]] = item; |
|---|
| 117 |
|
|---|
| 118 |
} |
|---|
| 119 |
else |
|---|
| 120 |
{ |
|---|
| 121 |
string key = Globals::proxyParser->projectParser->modules[i]->srcfile->toChars(); |
|---|
| 122 |
HTREEITEM item = tree->InsertItem(key.c_str(),0,0); |
|---|
| 123 |
tree->SetItemData(item,(DWORD)Globals::proxyParser->projectParser->modules[i] ); |
|---|
| 124 |
moduleMap[Globals::proxyParser->projectParser->modules[i]] = item; |
|---|
| 125 |
} |
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 |
|
|---|
| 129 |
} |
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 |
for ( i = 0 ; i < classes.size() ; i ++ ) |
|---|
| 133 |
{ |
|---|
| 134 |
|
|---|
| 135 |
ClassListing* listing= classes[i]; |
|---|
| 136 |
HTREEITEM moduleItem ; |
|---|
| 137 |
|
|---|
| 138 |
Module* classMod = listing->module; |
|---|
| 139 |
|
|---|
| 140 |
HTREEITEM classItem = NULL; |
|---|
| 141 |
|
|---|
| 142 |
if ( classMod ) |
|---|
| 143 |
{ |
|---|
| 144 |
moduleItem = moduleMap[classMod]; |
|---|
| 145 |
|
|---|
| 146 |
if ( moduleItem ) { |
|---|
| 147 |
classItem = tree->InsertItem(string("class " + listing->name).c_str(),3,3,moduleItem); |
|---|
| 148 |
tree->SetItemData(classItem,(DWORD)listing->sym ); |
|---|
| 149 |
} |
|---|
| 150 |
else continue; |
|---|
| 151 |
|
|---|
| 152 |
for ( int j = 0 ; j < listing->symbols.size();j++) |
|---|
| 153 |
{ |
|---|
| 154 |
|
|---|
| 155 |
vector<string> enumItems; |
|---|
| 156 |
|
|---|
| 157 |
string parms, retType, display; |
|---|
| 158 |
HTREEITEM tempItem; |
|---|
| 159 |
if ( Globals::proxyParser->projectParser->display.parseFunctionForDisplay(listing->symbols[j]->sym,display) ) |
|---|
| 160 |
{ |
|---|
| 161 |
|
|---|
| 162 |
int x = GetImageNumber(listing->symbols[j]); |
|---|
| 163 |
tempItem = tree->InsertItem(display.c_str(),x,x,classItem ); |
|---|
| 164 |
} |
|---|
| 165 |
|
|---|
| 166 |
else if ( Globals::proxyParser->projectParser->display.parseVarForDisplay(listing->symbols[j]->sym, display)) |
|---|
| 167 |
{ |
|---|
| 168 |
int x = GetImageNumber(listing->symbols[j]); |
|---|
| 169 |
tempItem = tree->InsertItem(display.c_str(),x,x,classItem); |
|---|
| 170 |
|
|---|
| 171 |
} |
|---|
| 172 |
else if ( Globals::proxyParser->projectParser->display.parseImportForDisplay(listing->symbols[j]->sym, display)) |
|---|
| 173 |
{ |
|---|
| 174 |
int x = GetImageNumber(listing->symbols[j]); |
|---|
| 175 |
tempItem = tree->InsertItem(display.c_str(),x,x,classItem); |
|---|
| 176 |
|
|---|
| 177 |
} |
|---|
| 178 |
else if ( Globals::proxyParser->projectParser->display.parseEnumsForDisplay(listing->symbols[j]->sym,enumItems)) |
|---|
| 179 |
{ |
|---|
| 180 |
int x = GetImageNumber(listing->symbols[j]) ; |
|---|
| 181 |
tempItem = tree->InsertItem(listing->symbols[j]->sym->toChars(),x,x,classItem); |
|---|
| 182 |
|
|---|
| 183 |
for ( int j = 0 ; j < enumItems.size(); j++ ) |
|---|
| 184 |
{ |
|---|
| 185 |
tree->InsertItem(enumItems[j].c_str(),x,x,tempItem); |
|---|
| 186 |
|
|---|
| 187 |
} |
|---|
| 188 |
} |
|---|
| 189 |
else tempItem = tree->InsertItem(Globals::proxyParser->projectParser->display.parseSymbolForDisplay(listing->symbols[j]->sym).c_str(),GetImageNumber(listing->symbols[j]),GetImageNumber(listing->symbols[j]),classItem); |
|---|
| 190 |
|
|---|
| 191 |
tree->SetItemData(tempItem,(DWORD)listing->symbols[j]->sym ); |
|---|
| 192 |
|
|---|
| 193 |
|
|---|
| 194 |
} |
|---|
| 195 |
|
|---|
| 196 |
} |
|---|
| 197 |
else ;// AfxMessageBox("no m"); |
|---|
| 198 |
|
|---|
| 199 |
} |
|---|
| 200 |
|
|---|
| 201 |
} |
|---|
| 202 |
|
|---|
| 203 |
} |
|---|
| 204 |
|
|---|
| 205 |
} |
|---|
| 206 |
void DisplayClasses() { |
|---|
| 207 |
ClearCodeTreeCtrl(); |
|---|
| 208 |
|
|---|
| 209 |
if ( Globals::proxyParser->projectParser ) |
|---|
| 210 |
{ |
|---|
| 211 |
|
|---|
| 212 |
|
|---|
| 213 |
vector<ClassListing*> classes = Globals::proxyParser->projectParser->getClasses(); |
|---|
| 214 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 215 |
if ( f ) { |
|---|
| 216 |
|
|---|
| 217 |
CCodeBrowsingTreeCtrl& tree = (f->m_wndTabDockBar.m_codeBrowser.m_tagTree); |
|---|
| 218 |
|
|---|
| 219 |
for ( int i = 0 ; i < classes.size() ; i ++ ) |
|---|
| 220 |
{ |
|---|
| 221 |
|
|---|
| 222 |
ClassListing* listing= classes[i]; |
|---|
| 223 |
//AfxMessageBox(listing->name.c_str()); |
|---|
| 224 |
HTREEITEM classItem = tree.InsertItem(string("class " + listing->name).c_str(),3,3); |
|---|
| 225 |
tree.SetItemData(classItem,(DWORD)listing->sym); |
|---|
| 226 |
|
|---|
| 227 |
for ( int j = 0 ; j < listing->symbols.size();j++) |
|---|
| 228 |
{ |
|---|
| 229 |
|
|---|
| 230 |
string display = Globals::proxyParser->projectParser->display.parseSymbolForDisplay(listing->symbols[j]->sym); |
|---|
| 231 |
int x = GetImageNumber(listing->symbols[j]) ; |
|---|
| 232 |
|
|---|
| 233 |
HTREEITEM tempItem = tree.InsertItem(display.c_str(),x,x,classItem); |
|---|
| 234 |
if ( listing->symbols[j]->sym ) tree.SetItemData(tempItem,(DWORD)listing->symbols[j]->sym ); |
|---|
| 235 |
// |
|---|
| 236 |
// string parms, retType, display; |
|---|
| 237 |
// vector<string> enumItems; |
|---|
| 238 |
// HTREEITEM tempItem; |
|---|
| 239 |
// |
|---|
| 240 |
// if ( Globals::proxyParser->projectParser->display.parseFunctionForDisplay(listing->symbols[j]->sym,display) ) |
|---|
| 241 |
// { |
|---|
| 242 |
// |
|---|
| 243 |
// tempItem = tree->InsertItem(display.c_str(),0,0,classItem); |
|---|
| 244 |
// } |
|---|
| 245 |
// else if ( Globals::proxyParser->projectParser->display.parseVarForDisplay(listing->symbols[j]->sym, display)) |
|---|
| 246 |
// { |
|---|
| 247 |
// tempItem = tree->InsertItem(display.c_str(),0,0,classItem); |
|---|
| 248 |
// |
|---|
| 249 |
// } |
|---|
| 250 |
// else if ( Globals::proxyParser->projectParser->display.parseImportForDisplay(listing->symbols[j]->sym, display)) |
|---|
| 251 |
// { |
|---|
| 252 |
// tempItem = tree->InsertItem(display.c_str(),0,0,classItem); |
|---|
| 253 |
// |
|---|
| 254 |
// } |
|---|
| 255 |
// else if ( Globals::proxyParser->projectParser->display.parseEnumsForDisplay(listing->symbols[j]->sym,enumItems)) |
|---|
| 256 |
// { |
|---|
| 257 |
// HTREEITEM enumItem = tree->InsertItem(listing->symbols[j]->sym->toChars(),0,0,classItem); |
|---|
| 258 |
// |
|---|
| 259 |
// for ( int k = 0 ; j < enumItems.size(); k++ ) |
|---|
| 260 |
// { |
|---|
| 261 |
// tree->InsertItem(enumItems[k].c_str(),0,0,enumItem); |
|---|
| 262 |
// } |
|---|
| 263 |
// |
|---|
| 264 |
// tempItem = enumItem; |
|---|
| 265 |
// } |
|---|
| 266 |
// else tempItem = tree->InsertItem(listing->symbols[j]->name.c_str(),0,0,classItem); |
|---|
| 267 |
// |
|---|
| 268 |
// |
|---|
| 269 |
// if ( listing->symbols[j]->sym ) tree->SetItemData(tempItem,(DWORD)listing->symbols[j]->sym ); |
|---|
| 270 |
} |
|---|
| 271 |
|
|---|
| 272 |
|
|---|
| 273 |
} |
|---|
| 274 |
|
|---|
| 275 |
} |
|---|
| 276 |
|
|---|
| 277 |
} |
|---|
| 278 |
|
|---|
| 279 |
} |
|---|
| 280 |
|
|---|
| 281 |
void DisplayInterfaces() { |
|---|
| 282 |
|
|---|
| 283 |
ClearCodeTreeCtrl(); |
|---|
| 284 |
string parms, retType; |
|---|
| 285 |
|
|---|
| 286 |
|
|---|
| 287 |
vector<ClassListing*> listings = Globals::proxyParser->projectParser->getInterfaces(); |
|---|
| 288 |
|
|---|
| 289 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 290 |
if ( f ) { |
|---|
| 291 |
|
|---|
| 292 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 293 |
|
|---|
| 294 |
|
|---|
| 295 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 296 |
{ |
|---|
| 297 |
|
|---|
| 298 |
ClassListing* listing = listings[i]; |
|---|
| 299 |
HTREEITEM interfaceItem = tree->InsertItem(string("interface" + listing->name).c_str(),1,1); |
|---|
| 300 |
tree->SetItemData(interfaceItem ,(DWORD)listing->sym); |
|---|
| 301 |
for (int j = 0 ; j < listings[i]->symbols.size(); j++ ) |
|---|
| 302 |
{ |
|---|
| 303 |
|
|---|
| 304 |
HTREEITEM tempItem; |
|---|
| 305 |
|
|---|
| 306 |
string display = Globals::proxyParser->projectParser->display.parseSymbolForDisplay(listing->symbols[j]->sym); |
|---|
| 307 |
int x = GetImageNumber(listings[i]->symbols[j]) ; |
|---|
| 308 |
|
|---|
| 309 |
tempItem = tree->InsertItem(display.c_str(),x,x,interfaceItem); |
|---|
| 310 |
tree->SetItemData(tempItem,(DWORD) listings[i]->symbols[j]->sym); |
|---|
| 311 |
} |
|---|
| 312 |
|
|---|
| 313 |
|
|---|
| 314 |
|
|---|
| 315 |
|
|---|
| 316 |
} |
|---|
| 317 |
|
|---|
| 318 |
} |
|---|
| 319 |
|
|---|
| 320 |
} |
|---|
| 321 |
void DisplayStructs() { |
|---|
| 322 |
|
|---|
| 323 |
ClearCodeTreeCtrl(); |
|---|
| 324 |
if ( Globals::proxyParser->projectParser ) |
|---|
| 325 |
{ |
|---|
| 326 |
|
|---|
| 327 |
vector<ClassListing*> classes = Globals::proxyParser->projectParser->getStructs(); |
|---|
| 328 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 329 |
if ( f ) { |
|---|
| 330 |
|
|---|
| 331 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 332 |
|
|---|
| 333 |
for ( int i = 0 ; i < classes.size() ; i ++ ) |
|---|
| 334 |
{ |
|---|
| 335 |
ClassListing* listing= classes[i]; |
|---|
| 336 |
|
|---|
| 337 |
HTREEITEM classItem = tree->InsertItem(string("struct " + listing->name).c_str(),2,2); |
|---|
| 338 |
tree->SetItemData(classItem,(DWORD) listing->sym); |
|---|
| 339 |
|
|---|
| 340 |
for ( int j = 0 ; j < listing->symbols.size();j++) |
|---|
| 341 |
{ |
|---|
| 342 |
string parms, retType, display; |
|---|
| 343 |
vector<string> enumItems; |
|---|
| 344 |
HTREEITEM tempItem = NULL; |
|---|
| 345 |
|
|---|
| 346 |
|
|---|
| 347 |
if ( Globals::proxyParser->projectParser->display.parseEnumsForDisplay(listing->symbols[j]->sym,enumItems)) |
|---|
| 348 |
{ |
|---|
| 349 |
HTREEITEM enumItem = tree->InsertItem(listing->symbols[j]->sym->toChars(),0,0,classItem); |
|---|
| 350 |
|
|---|
| 351 |
for ( int j = 0 ; j < enumItems.size(); j++ ) |
|---|
| 352 |
{ |
|---|
| 353 |
tree->InsertItem(enumItems[j].c_str(),5,5,enumItem); |
|---|
| 354 |
} |
|---|
| 355 |
|
|---|
| 356 |
tempItem = enumItem; |
|---|
| 357 |
} |
|---|
| 358 |
|
|---|
| 359 |
else { |
|---|
| 360 |
string display = Globals::proxyParser->projectParser->display.parseSymbolForDisplay(listing->symbols[j]->sym); |
|---|
| 361 |
int x = GetImageNumber(listing->symbols[j]) ; |
|---|
| 362 |
tempItem = tree->InsertItem(display.c_str(),x,x,classItem); |
|---|
| 363 |
} |
|---|
| 364 |
|
|---|
| 365 |
tree->SetItemData(tempItem,(DWORD)listing->symbols[j]->sym); |
|---|
| 366 |
|
|---|
| 367 |
} |
|---|
| 368 |
|
|---|
| 369 |
|
|---|
| 370 |
} |
|---|
| 371 |
|
|---|
| 372 |
} |
|---|
| 373 |
|
|---|
| 374 |
} |
|---|
| 375 |
|
|---|
| 376 |
} |
|---|
| 377 |
void DisplayFunctions() { |
|---|
| 378 |
|
|---|
| 379 |
ClearCodeTreeCtrl(); |
|---|
| 380 |
string parms, retType; |
|---|
| 381 |
|
|---|
| 382 |
vector<SymbolListing*> listings; |
|---|
| 383 |
|
|---|
| 384 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_GLOBAL_FUNCTION ); |
|---|
| 385 |
|
|---|
| 386 |
|
|---|
| 387 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 388 |
if ( f ) { |
|---|
| 389 |
|
|---|
| 390 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 391 |
|
|---|
| 392 |
|
|---|
| 393 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 394 |
{ |
|---|
| 395 |
HTREEITEM tempItem; |
|---|
| 396 |
string display; |
|---|
| 397 |
if ( Globals::proxyParser->projectParser->display.parseFunctionForDisplay(listings[i]->sym,display) ) |
|---|
| 398 |
{ |
|---|
| 399 |
|
|---|
| 400 |
tempItem = tree->InsertItem(display.c_str(),13,13); |
|---|
| 401 |
} |
|---|
| 402 |
else tempItem = tree->InsertItem(string("void " + listings[i]->name).c_str(),13,13); |
|---|
| 403 |
|
|---|
| 404 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 405 |
|
|---|
| 406 |
} |
|---|
| 407 |
|
|---|
| 408 |
} |
|---|
| 409 |
|
|---|
| 410 |
} |
|---|
| 411 |
|
|---|
| 412 |
|
|---|
| 413 |
void DisplayTemplates() { |
|---|
| 414 |
ClearCodeTreeCtrl(); |
|---|
| 415 |
|
|---|
| 416 |
vector<SymbolListing*> listings; |
|---|
| 417 |
|
|---|
| 418 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_TEMPLATE ); |
|---|
| 419 |
|
|---|
| 420 |
|
|---|
| 421 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 422 |
if ( f ) { |
|---|
| 423 |
|
|---|
| 424 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 425 |
string display; |
|---|
| 426 |
|
|---|
| 427 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 428 |
{ |
|---|
| 429 |
if ( Globals::proxyParser->projectParser->display.parseTemplateForDisplay(listings[i]->sym,display) ) |
|---|
| 430 |
{ |
|---|
| 431 |
HTREEITEM classItem = tree->InsertItem(display.c_str(),4,4); |
|---|
| 432 |
tree->SetItemData(classItem,(DWORD)listings[i]->sym); |
|---|
| 433 |
TemplateDeclaration* listing = ( TemplateDeclaration*) listings[i]->sym; |
|---|
| 434 |
|
|---|
| 435 |
|
|---|
| 436 |
for ( int j = 0 ; j < listing->members->dim;j++) |
|---|
| 437 |
{ |
|---|
| 438 |
Dsymbol* memberSym = (Dsymbol*) listing->members->data[j]; |
|---|
| 439 |
|
|---|
| 440 |
string parms, retType, display; |
|---|
| 441 |
vector<string> enumItems; |
|---|
| 442 |
HTREEITEM tempItem = NULL; |
|---|
| 443 |
|
|---|
| 444 |
|
|---|
| 445 |
if ( Globals::proxyParser->projectParser->display.parseEnumsForDisplay(memberSym,enumItems)) |
|---|
| 446 |
{ |
|---|
| 447 |
HTREEITEM enumItem = tree->InsertItem(memberSym->toChars(),5,5,classItem); |
|---|
| 448 |
|
|---|
| 449 |
for ( int j = 0 ; j < enumItems.size(); j++ ) |
|---|
| 450 |
{ |
|---|
| 451 |
tree->InsertItem(enumItems[j].c_str(),5,5,enumItem); |
|---|
| 452 |
} |
|---|
| 453 |
|
|---|
| 454 |
tempItem = enumItem; |
|---|
| 455 |
} |
|---|
| 456 |
|
|---|
| 457 |
|
|---|
| 458 |
else { |
|---|
| 459 |
string display = Globals::proxyParser->projectParser->display.parseSymbolForDisplay(memberSym); |
|---|
| 460 |
tempItem = tree->InsertItem(display.c_str(),15,15,classItem); |
|---|
| 461 |
} |
|---|
| 462 |
|
|---|
| 463 |
tree->SetItemData(tempItem,(DWORD)memberSym); |
|---|
| 464 |
|
|---|
| 465 |
} |
|---|
| 466 |
|
|---|
| 467 |
} |
|---|
| 468 |
|
|---|
| 469 |
} |
|---|
| 470 |
|
|---|
| 471 |
|
|---|
| 472 |
} |
|---|
| 473 |
|
|---|
| 474 |
} |
|---|
| 475 |
void DisplayMixins() { |
|---|
| 476 |
|
|---|
| 477 |
|
|---|
| 478 |
ClearCodeTreeCtrl(); |
|---|
| 479 |
string parms, retType; |
|---|
| 480 |
|
|---|
| 481 |
vector<SymbolListing*> listings; |
|---|
| 482 |
|
|---|
| 483 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_MIXIN); |
|---|
| 484 |
|
|---|
| 485 |
|
|---|
| 486 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 487 |
if ( f ) { |
|---|
| 488 |
|
|---|
| 489 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 490 |
|
|---|
| 491 |
|
|---|
| 492 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 493 |
{ |
|---|
| 494 |
tree->InsertItem(listings[i]->name.c_str(),15,15); |
|---|
| 495 |
|
|---|
| 496 |
} |
|---|
| 497 |
|
|---|
| 498 |
} |
|---|
| 499 |
|
|---|
| 500 |
} |
|---|
| 501 |
void DisplayTypedefs() { |
|---|
| 502 |
ClearCodeTreeCtrl(); |
|---|
| 503 |
string parms, retType; |
|---|
| 504 |
|
|---|
| 505 |
vector<SymbolListing*> listings; |
|---|
| 506 |
|
|---|
| 507 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_TYPEDEF); |
|---|
| 508 |
|
|---|
| 509 |
|
|---|
| 510 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 511 |
if ( f ) { |
|---|
| 512 |
|
|---|
| 513 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 514 |
|
|---|
| 515 |
|
|---|
| 516 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 517 |
{ |
|---|
| 518 |
string display; |
|---|
| 519 |
|
|---|
| 520 |
if ( Globals::proxyParser->projectParser->display.parseTypedefForDisplay(listings[i]->sym,display)) { |
|---|
| 521 |
|
|---|
| 522 |
HTREEITEM tempItem = tree->InsertItem(display.c_str(),9,9); |
|---|
| 523 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 524 |
|
|---|
| 525 |
} |
|---|
| 526 |
} |
|---|
| 527 |
|
|---|
| 528 |
} |
|---|
| 529 |
|
|---|
| 530 |
} |
|---|
| 531 |
void DisplayAliases() { |
|---|
| 532 |
|
|---|
| 533 |
ClearCodeTreeCtrl(); |
|---|
| 534 |
string parms, retType; |
|---|
| 535 |
|
|---|
| 536 |
vector<SymbolListing*> listings; |
|---|
| 537 |
|
|---|
| 538 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_ALIAS); |
|---|
| 539 |
|
|---|
| 540 |
|
|---|
| 541 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 542 |
if ( f ) { |
|---|
| 543 |
|
|---|
| 544 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 545 |
|
|---|
| 546 |
|
|---|
| 547 |
|
|---|
| 548 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 549 |
{ |
|---|
| 550 |
string display; |
|---|
| 551 |
if ( Globals::proxyParser->projectParser->display.parseAliasForDisplay(listings[i]->sym,display)) { |
|---|
| 552 |
|
|---|
| 553 |
HTREEITEM tempItem = tree->InsertItem(display.c_str(),9,9); |
|---|
| 554 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 555 |
|
|---|
| 556 |
} |
|---|
| 557 |
|
|---|
| 558 |
} |
|---|
| 559 |
|
|---|
| 560 |
} |
|---|
| 561 |
|
|---|
| 562 |
} |
|---|
| 563 |
void DisplayFuncLiterals() {} |
|---|
| 564 |
void DisplayInvariants() { |
|---|
| 565 |
|
|---|
| 566 |
ClearCodeTreeCtrl(); |
|---|
| 567 |
string parms, retType; |
|---|
| 568 |
|
|---|
| 569 |
vector<SymbolListing*> listings; |
|---|
| 570 |
|
|---|
| 571 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_INVARIANT); |
|---|
| 572 |
|
|---|
| 573 |
|
|---|
| 574 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 575 |
if ( f ) { |
|---|
| 576 |
|
|---|
| 577 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 578 |
|
|---|
| 579 |
|
|---|
| 580 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 581 |
{ |
|---|
| 582 |
string display; |
|---|
| 583 |
if ( Globals::proxyParser->projectParser->display.parseInvariantForDisplay(listings[i]->sym,display)) { |
|---|
| 584 |
|
|---|
| 585 |
HTREEITEM tempItem = tree->InsertItem(display.c_str(),6,6); |
|---|
| 586 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 587 |
|
|---|
| 588 |
} |
|---|
| 589 |
} |
|---|
| 590 |
|
|---|
| 591 |
} |
|---|
| 592 |
|
|---|
| 593 |
} |
|---|
| 594 |
void DisplayUnittests() { |
|---|
| 595 |
|
|---|
| 596 |
ClearCodeTreeCtrl(); |
|---|
| 597 |
string parms, retType; |
|---|
| 598 |
|
|---|
| 599 |
vector<SymbolListing*> listings; |
|---|
| 600 |
|
|---|
| 601 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_UNITTEST); |
|---|
| 602 |
|
|---|
| 603 |
|
|---|
| 604 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 605 |
if ( f ) { |
|---|
| 606 |
|
|---|
| 607 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 608 |
|
|---|
| 609 |
|
|---|
| 610 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 611 |
{ |
|---|
| 612 |
string display; |
|---|
| 613 |
if ( Globals::proxyParser->projectParser->display.parseUnitTestForDisplay(listings[i]->sym,display)) { |
|---|
| 614 |
|
|---|
| 615 |
HTREEITEM tempItem = tree->InsertItem(display.c_str(),6,6); |
|---|
| 616 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 617 |
|
|---|
| 618 |
} |
|---|
| 619 |
} |
|---|
| 620 |
|
|---|
| 621 |
} |
|---|
| 622 |
|
|---|
| 623 |
} |
|---|
| 624 |
|
|---|
| 625 |
void DisplayLinkDecls() { |
|---|
| 626 |
|
|---|
| 627 |
ClearCodeTreeCtrl(); |
|---|
| 628 |
string parms, retType; |
|---|
| 629 |
|
|---|
| 630 |
vector<SymbolListing*> listings; |
|---|
| 631 |
|
|---|
| 632 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_LINKDECLARATION); |
|---|
| 633 |
|
|---|
| 634 |
|
|---|
| 635 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 636 |
if ( f ) { |
|---|
| 637 |
|
|---|
| 638 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 639 |
|
|---|
| 640 |
|
|---|
| 641 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 642 |
{ |
|---|
| 643 |
string display ; |
|---|
| 644 |
|
|---|
| 645 |
|
|---|
| 646 |
LinkDeclaration* d= ( LinkDeclaration*)listings[i]->sym; |
|---|
| 647 |
|
|---|
| 648 |
HTREEITEM tempItem = tree->InsertItem(d->toChars(),0,0); |
|---|
| 649 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 650 |
|
|---|
| 651 |
|
|---|
| 652 |
|
|---|
| 653 |
} |
|---|
| 654 |
|
|---|
| 655 |
|
|---|
| 656 |
} |
|---|
| 657 |
|
|---|
| 658 |
} |
|---|
| 659 |
|
|---|
| 660 |
|
|---|
| 661 |
void DisplayVersionDecls() { |
|---|
| 662 |
|
|---|
| 663 |
ClearCodeTreeCtrl(); |
|---|
| 664 |
string parms, retType; |
|---|
| 665 |
|
|---|
| 666 |
vector<SymbolListing*> listings; |
|---|
| 667 |
|
|---|
| 668 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_VERSION); |
|---|
| 669 |
|
|---|
| 670 |
|
|---|
| 671 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 672 |
if ( f ) { |
|---|
| 673 |
|
|---|
| 674 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 675 |
|
|---|
| 676 |
|
|---|
| 677 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 678 |
{ |
|---|
| 679 |
string display ; |
|---|
| 680 |
|
|---|
| 681 |
if ( Globals::proxyParser->projectParser->display.parseVersionForDisplay(listings[i]->sym,display) ) { |
|---|
| 682 |
VersionDeclaration* d= ( VersionDeclaration*)listings[i]->sym; |
|---|
| 683 |
|
|---|
| 684 |
HTREEITEM tempItem = tree->InsertItem(display.c_str(),6,6); |
|---|
| 685 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 686 |
} |
|---|
| 687 |
|
|---|
| 688 |
|
|---|
| 689 |
} |
|---|
| 690 |
|
|---|
| 691 |
|
|---|
| 692 |
} |
|---|
| 693 |
|
|---|
| 694 |
} |
|---|
| 695 |
void DisplayStaticCtors() { |
|---|
| 696 |
|
|---|
| 697 |
ClearCodeTreeCtrl(); |
|---|
| 698 |
string parms, retType; |
|---|
| 699 |
|
|---|
| 700 |
vector<SymbolListing*> listings; |
|---|
| 701 |
|
|---|
| 702 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_STATICCTOR); |
|---|
| 703 |
|
|---|
| 704 |
|
|---|
| 705 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 706 |
if ( f ) { |
|---|
| 707 |
|
|---|
| 708 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 709 |
|
|---|
| 710 |
|
|---|
| 711 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 712 |
{ |
|---|
| 713 |
HTREEITEM staticCtors = tree->InsertItem(listings[i]->name.c_str(),13,13); |
|---|
| 714 |
tree->SetItemData(staticCtors ,(DWORD)listings[i]->sym ); |
|---|
| 715 |
|
|---|
| 716 |
} |
|---|
| 717 |
|
|---|
| 718 |
} |
|---|
| 719 |
|
|---|
| 720 |
} |
|---|
| 721 |
void DisplayStaticDtors() { |
|---|
| 722 |
|
|---|
| 723 |
|
|---|
| 724 |
ClearCodeTreeCtrl(); |
|---|
| 725 |
string parms, retType; |
|---|
| 726 |
|
|---|
| 727 |
vector<SymbolListing*> listings; |
|---|
| 728 |
|
|---|
| 729 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_STATICDTOR); |
|---|
| 730 |
|
|---|
| 731 |
|
|---|
| 732 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 733 |
if ( f ) { |
|---|
| 734 |
|
|---|
| 735 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 736 |
|
|---|
| 737 |
|
|---|
| 738 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 739 |
{ |
|---|
| 740 |
HTREEITEM tempItem = tree->InsertItem(listings[i]->name.c_str(),13,13); |
|---|
| 741 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 742 |
|
|---|
| 743 |
} |
|---|
| 744 |
|
|---|
| 745 |
} |
|---|
| 746 |
|
|---|
| 747 |
} |
|---|
| 748 |
void DisplayImports() { |
|---|
| 749 |
|
|---|
| 750 |
ClearCodeTreeCtrl(); |
|---|
| 751 |
vector<SymbolListing*> listings; |
|---|
| 752 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_IMPORT); |
|---|
| 753 |
|
|---|
| 754 |
|
|---|
| 755 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 756 |
if ( f ) { |
|---|
| 757 |
|
|---|
| 758 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 759 |
|
|---|
| 760 |
|
|---|
| 761 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 762 |
{ |
|---|
| 763 |
string display; |
|---|
| 764 |
Globals::proxyParser->projectParser->display.parseImportForDisplay(listings[i]->sym,display ); |
|---|
| 765 |
HTREEITEM tempItem = tree->InsertItem(display.c_str(),13,13); |
|---|
| 766 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 767 |
|
|---|
| 768 |
} |
|---|
| 769 |
|
|---|
| 770 |
} |
|---|
| 771 |
} |
|---|
| 772 |
|
|---|
| 773 |
|
|---|
| 774 |
|
|---|
| 775 |
void DisplayDebugDecls() |
|---|
| 776 |
{ |
|---|
| 777 |
ClearCodeTreeCtrl(); |
|---|
| 778 |
string parms, retType; |
|---|
| 779 |
|
|---|
| 780 |
vector<SymbolListing*> listings; |
|---|
| 781 |
|
|---|
| 782 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_DEBUG); |
|---|
| 783 |
|
|---|
| 784 |
|
|---|
| 785 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 786 |
if ( f ) { |
|---|
| 787 |
|
|---|
| 788 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 789 |
|
|---|
| 790 |
|
|---|
| 791 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 792 |
{ |
|---|
| 793 |
string display ; |
|---|
| 794 |
|
|---|
| 795 |
if ( Globals::proxyParser->projectParser->display.parseDebugForDisplay(listings[i]->sym,display) ) { |
|---|
| 796 |
|
|---|
| 797 |
HTREEITEM tempItem = tree->InsertItem(display.c_str(),6,6); |
|---|
| 798 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 799 |
} |
|---|
| 800 |
|
|---|
| 801 |
} |
|---|
| 802 |
|
|---|
| 803 |
|
|---|
| 804 |
} |
|---|
| 805 |
|
|---|
| 806 |
} |
|---|
| 807 |
|
|---|
| 808 |
void DisplayEnums() { |
|---|
| 809 |
|
|---|
| 810 |
ClearCodeTreeCtrl(); |
|---|
| 811 |
string parms, retType; |
|---|
| 812 |
|
|---|
| 813 |
vector<SymbolListing*> listings; |
|---|
| 814 |
|
|---|
| 815 |
listings = Globals::proxyParser->projectParser->getTypeMembers(D_ENUM ); |
|---|
| 816 |
|
|---|
| 817 |
|
|---|
| 818 |
CMainFrame* f = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 819 |
if ( f ) { |
|---|
| 820 |
|
|---|
| 821 |
CCodeBrowsingTreeCtrl* tree = &f->m_wndTabDockBar.m_codeBrowser.m_tagTree; |
|---|
| 822 |
|
|---|
| 823 |
|
|---|
| 824 |
for ( int i = 0 ; i < listings.size(); i++ ) |
|---|
| 825 |
{ |
|---|
| 826 |
vector<string> enumItems; |
|---|
| 827 |
|
|---|
| 828 |
if ( Globals::proxyParser->projectParser->display.parseEnumsForDisplay(listings[i]->sym,enumItems)) |
|---|
| 829 |
{ |
|---|
| 830 |
HTREEITEM enumItem = tree->InsertItem(listings[i]->sym->toChars(),5,5); |
|---|
| 831 |
tree->SetItemData(enumItem,(DWORD)listings[i]->sym); |
|---|
| 832 |
for ( int j = 0 ; j < enumItems.size(); j++ ) |
|---|
| 833 |
{ |
|---|
| 834 |
HTREEITEM tempItem = tree->InsertItem(enumItems[j].c_str(),5,5,enumItem); |
|---|
| 835 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 836 |
} |
|---|
| 837 |
} |
|---|
| 838 |
else |
|---|
| 839 |
{ |
|---|
| 840 |
HTREEITEM tempItem = tree->InsertItem(listings[i]->sym->toChars(),5,5); |
|---|
| 841 |
tree->SetItemData(tempItem,(DWORD)listings[i]->sym); |
|---|
| 842 |
|
|---|
| 843 |
} |
|---|
| 844 |
|
|---|
| 845 |
|
|---|
| 846 |
} |
|---|
| 847 |
|
|---|
| 848 |
|
|---|
| 849 |
} |
|---|
| 850 |
|
|---|
| 851 |
} |
|---|