| 4187 | } |
| 4188 | |
| 4189 | void 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 | } |
no test coverage detected