public void AugmentSignatureHelpSession(ISignatureHelpSession session, System.Collections.Generic.IList <ISignature> signatures) { var span = session.GetApplicableSpan(_textBuffer); var sigs = _provider._serviceProvider.GetPythonToolsService().GetSignatures( session.TextView, _textBuffer.CurrentSnapshot, span ); if (sigs != null) { ISignature curSig = sigs.Signatures .OrderBy(s => s.Parameters.Count) .FirstOrDefault(s => sigs.ParameterIndex < s.Parameters.Count); foreach (var sig in sigs.Signatures) { signatures.Add(sig); } if (curSig != null) { // save the current sig so we don't need to recalculate it (we can't set it until // the signatures are added by our caller). session.Properties.AddProperty(typeof(PythonSignature), curSig); } } }
public void AugmentSignatureHelpSession(ISignatureHelpSession session, System.Collections.Generic.IList<ISignature> signatures) { var span = session.GetApplicableSpan(_textBuffer); var sigs = _textBuffer.CurrentSnapshot.GetSignatures(span); ISignature curSig = null; foreach (var sig in sigs.Signatures) { if (sigs.ParameterIndex == 0 || sig.Parameters.Count > sigs.ParameterIndex) { curSig = sig; break; } } foreach (var sig in sigs.Signatures) { signatures.Add(sig); } if (curSig != null) { // save the current sig so we don't need to recalculate it (we can't set it until // the signatures are added by our caller). session.Properties.AddProperty(typeof(JSignature), curSig); } }
public void AugmentSignatureHelpSession(ISignatureHelpSession session, System.Collections.Generic.IList <ISignature> signatures) { var span = session.GetApplicableSpan(_textBuffer); if (_provider._PublicFunctionProvider != null) { _provider._PublicFunctionProvider.SetFilename(_textBuffer.GetFilePath()); } var sigs = _textBuffer.CurrentSnapshot.GetSignatures(span, _provider._PublicFunctionProvider); ISignature curSig = null; foreach (var sig in sigs.Signatures) { if (sigs.ParameterIndex == 0 || sig.Parameters.Count > sigs.ParameterIndex) { curSig = sig; break; } } foreach (var sig in sigs.Signatures) { signatures.Add(sig); } if (curSig != null) { // save the current sig so we don't need to recalculate it (we can't set it until // the signatures are added by our caller). session.Properties.AddProperty(typeof(Genero4glFunctionSignature), curSig); } }
public void AugmentSignatureHelpSession(ISignatureHelpSession session, System.Collections.Generic.IList<ISignature> signatures) { var span = session.GetApplicableSpan(_textBuffer); var sigs = _textBuffer.CurrentSnapshot.GetSignatures(_provider._serviceProvider, span); ISignature curSig = sigs.Signatures .OrderBy(s => s.Parameters.Count) .FirstOrDefault(s => sigs.ParameterIndex < s.Parameters.Count); foreach (var sig in sigs.Signatures) { signatures.Add(sig); } if (curSig != null) { // save the current sig so we don't need to recalculate it (we can't set it until // the signatures are added by our caller). session.Properties.AddProperty(typeof(PythonSignature), curSig); } }