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

Method CheckTypeRefFixit

IDEHelper/Compiler/BfModuleTypeUtils.cpp:10758–10784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10756}
10757
10758void BfModule::CheckTypeRefFixit(BfAstNode* typeRef, const char* appendName)
10759{
10760 if ((mCompiler->IsAutocomplete()) && (mCompiler->mResolvePassData->mAutoComplete->CheckFixit((typeRef))))
10761 {
10762 String typeName = typeRef->ToString();
10763 if (appendName != NULL)
10764 typeName += appendName;
10765
10766 std::set<String> fixitNamespaces;
10767
10768 //TODO: Do proper value for numGenericArgs
10769 mSystem->FindFixitNamespaces(typeName, -1, mCompiler->mResolvePassData->mParsers[0]->mProject, fixitNamespaces);
10770
10771 int insertLoc = 0;
10772
10773 BfUsingFinder usingFinder;
10774 usingFinder.mFromIdx = typeRef->mSrcStart;
10775 usingFinder.VisitMembers(typeRef->GetSourceData()->mRootNode);
10776
10777 for (auto& namespaceStr : fixitNamespaces)
10778 {
10779 BfParserData* parser = typeRef->GetSourceData()->ToParserData();
10780 if (parser != NULL)
10781 mCompiler->mResolvePassData->mAutoComplete->AddEntry(AutoCompleteEntry("fixit", StrFormat("using %s;\t.using|%s|%d||using %s;", namespaceStr.c_str(), parser->mFileName.c_str(), usingFinder.mLastIdx, namespaceStr.c_str()).c_str()));
10782 }
10783 }
10784}
10785
10786void BfModule::CheckIdentifierFixit(BfAstNode* node)
10787{

Callers 4

VisitMethod · 0.80
MatchMethodMethod · 0.80
DoInvocationMethod · 0.80

Calls 10

AutoCompleteEntryClass · 0.85
IsAutocompleteMethod · 0.80
CheckFixitMethod · 0.80
FindFixitNamespacesMethod · 0.80
GetSourceDataMethod · 0.80
AddEntryMethod · 0.80
ToStringMethod · 0.45
VisitMembersMethod · 0.45
ToParserDataMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected