Skip to content

Commit

Permalink
Merge pull request #17 from Haacked/fixes-16
Browse files Browse the repository at this point in the history
Remove javascript signatures from encouragement
  • Loading branch information
haacked committed Jul 11, 2014
2 parents d99fc51 + 7b1ae50 commit 7a34d4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions EncouragePackage/EncourageSignatureHelpSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ public void AugmentSignatureHelpSession(ISignatureHelpSession session, IList<ISi
return;
}

// At the moment there is a bug in the javascript provider which causes it to
// repeatedly insert the same Signature values into an ISignatureHelpSession
// instance. There is no way, other than reflection, for us to prevent this
// from happening. Instead we just ensure that our provider runs after
// Javascript and then remove the values they add here
signatures.Clear();

// Map the trigger point down to our buffer.
var subjectTriggerPoint = session.GetTriggerPoint(subjectBuffer.CurrentSnapshot);
if (!subjectTriggerPoint.HasValue)
Expand Down
1 change: 1 addition & 0 deletions EncouragePackage/EncourageSignatureHelpSourceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Haack.Encourage
[Export(typeof(ISignatureHelpSourceProvider))]
[Name("ToolTip SignatureHelp Source")]
[Order(Before = "Default Signature Help Presenter")]
[Order(After = "JavaScript Signature Help source")]
[ContentType("text")]
internal class EncourageSignatureHelpSourceProvider : ISignatureHelpSourceProvider
{
Expand Down

0 comments on commit 7a34d4c

Please sign in to comment.