| 2223 | } |
| 2224 | |
| 2225 | bool BfAutoComplete::CheckExplicitInterface(BfTypeInstance* interfaceType, BfAstNode* dotToken, BfAstNode* memberName) |
| 2226 | { |
| 2227 | bool isAutocompletingName = false; |
| 2228 | if (memberName != NULL) |
| 2229 | isAutocompletingName = IsAutocompleteNode(dotToken, memberName, 0, 1); |
| 2230 | |
| 2231 | if (isAutocompletingName) |
| 2232 | { |
| 2233 | // |
| 2234 | } |
| 2235 | else if (IsAutocompleteNode(dotToken, 0, 1)) |
| 2236 | { |
| 2237 | mInsertStartIdx = dotToken->GetSrcEnd(); |
| 2238 | mInsertEndIdx = mInsertStartIdx; |
| 2239 | } |
| 2240 | else |
| 2241 | return false; |
| 2242 | |
| 2243 | mModule->PopulateType(interfaceType, BfPopulateType_DataAndMethods); |
| 2244 | |
| 2245 | String filter; |
| 2246 | if (isAutocompletingName) |
| 2247 | filter = GetFilter(memberName); |
| 2248 | |
| 2249 | auto activeTypeDef = mModule->GetActiveTypeDef(); |
| 2250 | |
| 2251 | BfShow checkShow = BfShow_Hide; |
| 2252 | |
| 2253 | for (auto methodDef : interfaceType->mTypeDef->mMethods) |
| 2254 | { |
| 2255 | if (methodDef->mIsOverride) |
| 2256 | continue; |
| 2257 | if (methodDef->mShow >= checkShow) |
| 2258 | continue; |
| 2259 | if (methodDef->mName.IsEmpty()) |
| 2260 | continue; |
| 2261 | |
| 2262 | if (methodDef->mExplicitInterface != NULL) |
| 2263 | continue; |
| 2264 | if ((!interfaceType->IsTypeMemberIncluded(methodDef->mDeclaringType, activeTypeDef, mModule)) || |
| 2265 | (!interfaceType->IsTypeMemberAccessible(methodDef->mDeclaringType, activeTypeDef))) |
| 2266 | continue; |
| 2267 | |
| 2268 | if (methodDef->mIsStatic) |
| 2269 | continue; |
| 2270 | |
| 2271 | bool canUseMethod; |
| 2272 | canUseMethod = (methodDef->mMethodType == BfMethodType_Normal); |
| 2273 | if (canUseMethod) |
| 2274 | { |
| 2275 | AddMethod(interfaceType, methodDef, NULL, methodDef->GetMethodDeclaration(), methodDef->mName, filter); |
| 2276 | } |
| 2277 | } |
| 2278 | |
| 2279 | return false; |
| 2280 | } |
| 2281 | |
| 2282 | void BfAutoComplete::CheckTypeRef(BfTypeReference* typeRef, bool mayBeIdentifier, bool isInExpression, bool onlyAttribute) |
no test coverage detected