Beispiel #1
0
        public ITagger <T> CreateTagger <T>(ITextView textView, ITextBuffer buffer) where T : ITag
        {
            if (buffer == null || textView == null)
            {
                return(null);
            }

            if (buffer != textView.TextBuffer)
            {
                return(null);
            }

            try
            {
                if (!_taggers.ContainsKey(textView))
                {
                    _taggers[textView] = new UnimplementedStepTagger(textView);
                }
                return(_taggers[textView] as ITagger <T>);
            }
            catch
            {
                return(null);
            }
        }
        public ImplementStepAction(SnapshotSpan span, UnimplementedStepTagger unimplementedStepTagger, IProject project)
        {
            _trackingSpan            = span.Snapshot.CreateTrackingSpan(span, SpanTrackingMode.EdgeInclusive);
            _span                    = span;
            _unimplementedStepTagger = unimplementedStepTagger;
            _snapshot                = _trackingSpan.TextBuffer.CurrentSnapshot;
            DisplayText              = "Implement Step";
            Icon = new BitmapImage(
                new Uri("pack://application:,,,/Gauge.VisualStudio;component/assets/glyphs/step.png"));
            _project = project;
            var step = new Step(_project, span.Start.GetContainingLine());

            _stepImplementationGenerator = new StepImplementationGenerator(project, step);
        }