예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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));
        }
예제 #4
0
        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));
        }
예제 #5
0
 private void Given_the_Feature_contains(string feature)
 {
     completions = new CompletionCalculator { Feature = feature };
 }