MCPcopy Create free account
hub / github.com/beefytech/Beef / AutocompleteAddTopLevelTypes

Method AutocompleteAddTopLevelTypes

IDEHelper/DbgExprEvaluator.cpp:3500–3571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3498}
3499
3500void DbgExprEvaluator::AutocompleteAddTopLevelTypes(const StringImpl& filter)
3501{
3502 GetNamespaceSearch();
3503 for (auto usingNamespace : mNamespaceSearch)
3504 {
3505 usingNamespace = usingNamespace->GetPrimaryType();
3506 AutocompleteAddMembers(usingNamespace, true, false, filter);
3507 }
3508
3509 mDbgModule->ParseGlobalsData();
3510 int methodEntryCount = 0;
3511 //for (auto compileUnit : mDbgModule->mCompileUnits)
3512 for (int compileIdx = 0; compileIdx < (int)mDbgModule->mCompileUnits.size(); compileIdx++)
3513 {
3514 auto compileUnit = mDbgModule->mCompileUnits[compileIdx];
3515 if (mDbgCompileUnit == NULL)
3516 continue;
3517 if ((compileUnit->mLanguage != DbgLanguage_Unknown) && (compileUnit->mLanguage != mDbgCompileUnit->mLanguage))
3518 continue;
3519
3520 AutocompleteAddMembers(compileUnit->mGlobalType, true, false, filter);
3521
3522 /*for (auto dwMethod : compileUnit->mGlobalType.mMethodList)
3523 {
3524 if (dwMethod->mName != NULL)
3525 {
3526 methodEntryCount++;
3527 mAutoComplete->AddEntry(AutoCompleteEntry("method", dwMethod->mName), filter);
3528 }
3529 }*/
3530 }
3531
3532 auto language = GetLanguage();
3533
3534 if (language == DbgLanguage_Beef)
3535 {
3536 for (auto primType : mDbgModule->mBfPrimitiveTypes)
3537 {
3538 if (primType != NULL)
3539 mAutoComplete->AddEntry(AutoCompleteEntry("valuetype", primType->mName), filter);
3540 }
3541
3542 char* primNames[2] = { "int", "uint" };
3543 for (auto primName : primNames)
3544 mAutoComplete->AddEntry(AutoCompleteEntry("valuetype", primName), filter);
3545 }
3546 else
3547 {
3548 for (auto primType : mDbgModule->mCPrimitiveTypes)
3549 {
3550 if (primType != NULL)
3551 mAutoComplete->AddEntry(AutoCompleteEntry("valuetype", primType->mName), filter);
3552 }
3553 }
3554
3555 int typeEntrCount = 0;
3556
3557 //TODO: Does this get everything?

Callers

nothing calls this directly

Calls 5

AutoCompleteEntryClass · 0.85
GetPrimaryTypeMethod · 0.80
AddEntryMethod · 0.80
ParseGlobalsDataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected