public void AugmentCompletionSession(ICompletionSession session, IList<CompletionSet> completionSets) { var currentLine = GetCurrentLineFrom(session); var feature = session.TextView.TextSnapshot.GetText(); var completions = new CompletionCalculator { Feature = feature }; completionSets.Add(new CompletionSet("Steps", "Steps", FindSpanAtCurrentPositionFrom(session), completions.For(currentLine.Extent.GetText().Trim()), null)); }
private void When_I_begin_to_type__on_the_next_line(string fragment) { var featureItem = Substitute.For<FeatureItem>(); featureItem.DefaultNamespace = "Features.Intellisense"; featureItem.Assembly.Returns("Common"); completions = new CompletionCalculator { FeatureItem = featureItem, FeatureText = FeatureRunner.FeatureContent }; results = completions.For(fragment); }
public void AugmentCompletionSession(ICompletionSession session, IList <CompletionSet> completionSets) { var currentLine = GetCurrentLineFrom(session); var feature = session.TextView.TextSnapshot.GetText(); var projectItem = (Marshal.GetActiveObject("VisualStudio.DTE") as DTE).ActiveDocument.ProjectItem; var featureItem = ObjectFactory.FeatureItemFrom(projectItem); var completions = new CompletionCalculator { FeatureItem = featureItem, FeatureText = feature }; completionSets.Add(new CompletionSet("Steps", "Steps", FindSpanAtCurrentPositionFrom(session), completions.For(currentLine.Extent.GetText().Trim()), null)); }
public void AugmentCompletionSession(ICompletionSession session, IList<CompletionSet> completionSets) { var currentLine = GetCurrentLineFrom(session); var feature = session.TextView.TextSnapshot.GetText(); var projectItem = (Marshal.GetActiveObject("VisualStudio.DTE") as DTE).ActiveDocument.ProjectItem; var featureItem = ObjectFactory.FeatureItemFrom(projectItem); var completions = new CompletionCalculator { FeatureItem = featureItem, FeatureText = feature }; completionSets.Add(new CompletionSet("Steps", "Steps", FindSpanAtCurrentPositionFrom(session), completions.For(currentLine.Extent.GetText().Trim()), null)); }
private void Given_the_Feature_contains(string feature) { completions = new CompletionCalculator { Feature = feature }; }