1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Go To Definition improvements

This commit is contained in:
Brian Fiete 2023-12-28 10:28:24 -05:00
parent 0bed50cf7c
commit e245c922db
2 changed files with 12 additions and 0 deletions

View file

@ -7632,6 +7632,8 @@ namespace IDE.ui
let c = ewc.mData.mText[checkPos].mChar;
if ((c.IsLetterOrDigit) || (c == '_') || (c == '@'))
return true;
if ((offset == 0) && (c == '.'))
return true;
let elementType = (SourceElementType)ewc.mData.mText[checkPos].mDisplayTypeId;
if (elementType == .Method)
return true;

View file

@ -21492,6 +21492,16 @@ void BfExprEvaluator::DoMemberReference(BfMemberReferenceExpression* memberRefEx
autoComplete->AddSelfResultTypeMembers(expectingTypeInst, expectingTypeInst, filter, allowPrivate);
}
}
else if ((expectingTypeInst != NULL) && (autoComplete->IsAutocompleteNode(memberRefExpr->mDotToken)) && (autoComplete->mIsGetDefinition))
{
if ((autoComplete->mDefType == NULL) &&
(autoComplete->mDefMethod == NULL) && (autoComplete->mDefField == NULL) &&
(autoComplete->mDefProp == NULL) && (expectingTypeInst->mTypeDef->mTypeDeclaration != NULL))
{
autoComplete->mDefType = expectingTypeInst->mTypeDef;
autoComplete->SetDefinitionLocation(expectingTypeInst->mTypeDef->mTypeDeclaration->mNameNode);
}
}
}
else
{