in Backend/Core/ForTea.Core/Services/CodeCompletion/DirectiveAttributeValueItemsProvider.cs [20:41]
protected override LookupFocusBehaviour GetLookupFocusBehaviour(T4CodeCompletionContext context)
=> LookupFocusBehaviour.SoftWhenEmpty;
protected override bool IsAvailable(T4CodeCompletionContext context)
{
ITreeNode node = context.BasicContext.File.FindNodeAt(context.BasicContext.SelectedTreeRange);
if (!(node?.Parent is IT4DirectiveAttribute))
return false;
TokenNodeType tokenType = node.GetTokenType();
if (tokenType == T4TokenNodeTypes.RAW_ATTRIBUTE_VALUE)
return true;
if (tokenType == T4TokenNodeTypes.QUOTE)
{
ITreeNode leftSibling = node.GetPreviousMeaningfulSibling();
if (leftSibling != null && leftSibling.GetTokenType() == T4TokenNodeTypes.EQUAL)
return true;
}
return false;
}