Example #1
0
        private bool TryInitializeIntellisenseContext(IIntellisenseContext context, TexlBinding binding, Formula formula, out IntellisenseData.IntellisenseData data)
        {
            Contracts.AssertValue(context);

            TexlNode          currentNode = TexlNode.FindNode(formula.ParseTree, context.CursorPosition);
            TexlFunction      curFunc;
            int               argIndex, argCount;
            DType             expectedType;
            IsValidSuggestion isValidSuggestionFunc;

            GetFunctionAndTypeInformation(context, currentNode, binding, out curFunc, out argIndex, out argCount, out expectedType, out isValidSuggestionFunc);
            data = CreateData(context, expectedType, binding, curFunc, currentNode, argIndex, argCount, isValidSuggestionFunc, binding.GetExpandEntitiesMissingMetadata(), formula.Comments);
            return(true);
        }