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

Method FixitAddFullyQualify

IDEHelper/Compiler/BfAutoComplete.cpp:4189–4211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4187}
4188
4189void BfAutoComplete::FixitAddFullyQualify(BfAstNode* refNode, const StringImpl& findName, const SizedArrayImpl<BfUsingFieldData::MemberRef>& foundList)
4190{
4191 BfProtectionCheckFlags protectionCheckFlags = BfProtectionCheckFlag_None;
4192 String fullName;
4193 for (int entryIdx = 0; entryIdx < foundList.mSize - 1; entryIdx++)
4194 {
4195 auto& entry = foundList[entryIdx];
4196 if (entryIdx > 0)
4197 fullName += ".";
4198 if (!mModule->CheckProtection(protectionCheckFlags, entry.mTypeInstance, entry.GetDeclaringType(mModule)->mProject, entry.GetProtection(), mModule->mCurTypeInstance))
4199 fullName += "[Friend]";
4200 fullName += entry.GetName(mModule);
4201 }
4202
4203 BfParserData* parser = refNode->GetSourceData()->ToParserData();
4204 if (parser != NULL)
4205 {
4206 AddEntry(AutoCompleteEntry("fixit", StrFormat("Fully qualify 'using' name as '%s.%s'\tqualify|%s|%d|%s.",
4207 fullName.c_str(), findName.c_str(),
4208 parser->mFileName.c_str(), refNode->mSrcStart,
4209 fullName.c_str()).c_str()));
4210 }
4211}

Callers 2

LookupFieldMethod · 0.80
MatchMethodMethod · 0.80

Calls 8

AutoCompleteEntryClass · 0.85
GetDeclaringTypeMethod · 0.80
GetSourceDataMethod · 0.80
CheckProtectionMethod · 0.45
GetProtectionMethod · 0.45
GetNameMethod · 0.45
ToParserDataMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected