diff --git a/IDEHelper/Compiler/BfAutoComplete.cpp b/IDEHelper/Compiler/BfAutoComplete.cpp index c5cd98c1..22d81a7b 100644 --- a/IDEHelper/Compiler/BfAutoComplete.cpp +++ b/IDEHelper/Compiler/BfAutoComplete.cpp @@ -2444,9 +2444,9 @@ void BfAutoComplete::CheckLocalRef(BfAstNode* identifierNode, BfLocalVariable* v if (IsAutocompleteNode(identifierNode)) { if (varDecl->mNameNode != NULL) - SetDefinitionLocation(varDecl->mNameNode); + SetDefinitionLocation(varDecl->mNameNode, true); else if (varDecl->mIsThis) - SetDefinitionLocation(mModule->mCurTypeInstance->mTypeDef->GetRefNode()); + SetDefinitionLocation(mModule->mCurTypeInstance->mTypeDef->GetRefNode(), true); } } else if (mResolveType == BfResolveType_GetSymbolInfo) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index f798b8cb..508395e6 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -4093,6 +4093,8 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar resolvePassData->HandlePropertyReference(targetSrc, baseTypeInst->mTypeDef, basePropDef); if ((autoComplete != NULL) && (autoComplete->IsAutocompleteNode(targetSrc))) { + if (autoComplete->mIsGetDefinition) + autoComplete->SetDefinitionLocation(basePropDef->GetRefNode(), true); autoComplete->mDefProp = basePropDef; autoComplete->mDefType = baseTypeInst->mTypeDef; } @@ -6768,12 +6770,12 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp auto autoComplete = GetAutoComplete(); if ((autoComplete != NULL) && (autoComplete->IsAutocompleteNode(identifierNode))) { - autoComplete->SetDefinitionLocation(methodDef->GetRefNode()); + autoComplete->SetDefinitionLocation(methodDef->GetRefNode(), true); if (autoComplete->mDefType == NULL) - { + { autoComplete->mDefMethod = mModule->mCurMethodState->GetRootMethodState()->mMethodInstance->mMethodDef; autoComplete->mDefType = curTypeDef; - autoComplete->mReplaceLocalId = ~methodDef->mIdx; + autoComplete->mReplaceLocalId = ~methodDef->mIdx; } } @@ -7498,7 +7500,7 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp auto autoComplete = GetAutoComplete(); if ((autoComplete != NULL) && (autoComplete->IsAutocompleteNode(identifierNode))) { - autoComplete->SetDefinitionLocation(methodDef->GetRefNode()); + autoComplete->SetDefinitionLocation(methodDef->GetRefNode(), true); int virtualIdx = moduleMethodInstance.mMethodInstance->mVirtualTableIdx; if ((autoComplete->mResolveType == BfResolveType_GoToDefinition) && @@ -7523,7 +7525,7 @@ BfTypedValue BfExprEvaluator::MatchMethod(BfAstNode* targetSrc, BfMethodBoundExp if (autoComplete->mDefType == NULL) { autoComplete->mDefMethod = methodDef; - autoComplete->mDefType = moduleMethodInstance.mMethodInstance->GetOwner()->mTypeDef; + autoComplete->mDefType = moduleMethodInstance.mMethodInstance->GetOwner()->mTypeDef; } if (autoComplete->mResolveType == BfResolveType_GetResultString)