in resharper/src/CSharp/Completions/GodotSmartCompletion.cs [39:65]
protected override bool AddLookupItems(CSharpCodeCompletionContext context, IItemsCollector collector)
{
if (!IsAvailable(context))
return false;
var project = context.NodeInFile.GetProject();
if (project is null)
return false;
if (!project.IsGodotProject())
return false;
if (!project.GetComponent<GodotMessagingClient>().IsReady())
return false;
var stringLiteral = context.StringLiteral();
if (stringLiteral is null)
return false;
if (context.NodeInFile.Parent is { Parent: ICSharpArgument })
return LookupItemsForArgument(context, collector);
if (context.NodeInFile.Parent?.Parent is { Parent: ILocalVariableDeclaration localVariableDeclaration })
return LookupNodePathsForVariableDeclaration(localVariableDeclaration, context, collector);
return false;
}