Beispiel #1
0
            public Task <bool> HasSuggestedActionsAsync(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken)
            {
                if (MethodExtractor.CanExtract(_view) == true)
                {
                    return(Task.FromResult(true));
                }

                return(Task.FromResult(false));
            }
Beispiel #2
0
            private void Selection_SelectionChanged(object sender, EventArgs e)
            {
                var newValue = MethodExtractor.CanExtract(_view);

                if (newValue != _canExtract)
                {
                    _canExtract = newValue;
                    SuggestedActionsChanged?.Invoke(this, EventArgs.Empty);
                }
            }
Beispiel #3
0
            public IEnumerable <SuggestedActionSet> GetSuggestedActions(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken)
            {
                if (MethodExtractor.CanExtract(_view) == true)
                {
                    return(new SuggestedActionSet[] {
                        new SuggestedActionSet(
                            new [] { new SuggestedAction(_parent, _view) },
                            SuggestedActionSetPriority.High
                            )
                    });
                }

                return(Enumerable.Empty <SuggestedActionSet>());
            }
 public OutOfProcMethodExtractor(PythonAst ast, string code)
 {
     _extractor = new MethodExtractor(ast, code);
 }