Ejemplo n.º 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));
            }
Ejemplo n.º 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);
                }
            }
Ejemplo n.º 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>());
            }
Ejemplo n.º 4
0
 public OutOfProcMethodExtractor(PythonAst ast, string code)
 {
     _extractor = new MethodExtractor(ast, code);
 }