public IEnumerable <SuggestedActionSet> GetSuggestedActions(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken) { var list = new List <SuggestedActionSet>(); try { var rxTags = this.GetTags(range); foreach (var rxTag in rxTags) { switch (rxTag.SuggestedAction.Name) { case nameof(HardCodedStringAction): list.AddRange(this.CreateActionSet(rxTag, new HardCodedStringAction(this.file, this.view, (HardCodedStringTag)rxTag))); break; case nameof(InsertRowDefinitionAction): list.AddRange(this.CreateActionSet(rxTag, InsertRowDefinitionAction.Create((InsertRowDefinitionTag)rxTag, this.file, this.view))); break; case nameof(AddRowDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag, AddRowDefinitionsAction.Create((AddRowDefinitionsTag)rxTag, this.file))); break; case nameof(AddColumnDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag, AddColumnDefinitionsAction.Create((AddColumnDefinitionsTag)rxTag, this.file))); break; case nameof(AddRowAndColumnDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag, AddRowAndColumnDefinitionsAction.Create((AddRowAndColumnDefinitionsTag)rxTag, this.file))); break; case nameof(AddMissingRowDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag, AddMissingRowDefinitionsAction.Create((MissingRowDefinitionTag)rxTag, this.file))); break; case nameof(AddMissingColumnDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag, AddMissingColumnDefinitionsAction.Create((MissingColumnDefinitionTag)rxTag, this.file))); break; case nameof(RowSpanOverflowAction): list.AddRange(this.CreateActionSet(rxTag, RowSpanOverflowAction.Create((RowSpanOverflowTag)rxTag, this.file))); break; case nameof(ColumnSpanOverflowAction): list.AddRange(this.CreateActionSet(rxTag, ColumnSpanOverflowAction.Create((ColumnSpanOverflowTag)rxTag, this.file))); break; case nameof(AddTextBoxInputScopeAction): list.AddRange(this.CreateActionSet(rxTag, AddTextBoxInputScopeAction.Create((AddTextBoxInputScopeTag)rxTag, this.file))); break; case nameof(MissingCheckBoxEventAction): list.AddRange(this.CreateActionSet(rxTag, MissingCheckBoxEventAction.Create((CheckBoxCheckedAndUncheckedEventsTag)rxTag, this.file))); break; case nameof(MediaElementAction): list.AddRange(this.CreateActionSet(rxTag, MediaElementAction.Create((UseMediaPlayerElementTag)rxTag, this.file))); break; case nameof(MakeNameStartWithCapitalAction): list.AddRange(this.CreateActionSet(rxTag, MakeNameStartWithCapitalAction.Create((NameTitleCaseTag)rxTag, this.file))); break; case nameof(MakeUidStartWithCapitalAction): list.AddRange(this.CreateActionSet(rxTag, MakeUidStartWithCapitalAction.Create((UidTitleCaseTag)rxTag, this.file))); break; case nameof(SelectedItemBindingModeAction): list.AddRange(this.CreateActionSet(rxTag, SelectedItemBindingModeAction.Create((SelectedItemBindingModeTag)rxTag, this.file))); break; case nameof(CustomAnalysisAction): list.AddRange(this.CreateActionSet(rxTag, CustomAnalysisAction.Create((CustomAnalysisTag)rxTag, this.file))); break; } } } catch (Exception e) { SharedRapidXamlPackage.Logger?.RecordException(e); } return(list); }
public IEnumerable <SuggestedActionSet> GetSuggestedActions(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, CancellationToken cancellationToken) { var list = new List <SuggestedActionSet>(); try { var rxTags = this.GetTags(range); foreach (var rxTag in rxTags) { switch (rxTag.SuggestedAction.Name) { case nameof(HardCodedStringAction): list.AddRange(this.CreateActionSet(rxTag.Span, new HardCodedStringAction(this.file, this.view, (HardCodedStringTag)rxTag))); break; case nameof(InsertRowDefinitionAction): list.AddRange(this.CreateActionSet(rxTag.Span, InsertRowDefinitionAction.Create((InsertRowDefinitionTag)rxTag, this.file, this.view))); break; case nameof(AddRowDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag.Span, AddRowDefinitionsAction.Create((AddRowDefinitionsTag)rxTag, this.file))); break; case nameof(AddColumnDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag.Span, AddColumnDefinitionsAction.Create((AddColumnDefinitionsTag)rxTag, this.file))); break; case nameof(AddRowAndColumnDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag.Span, AddRowAndColumnDefinitionsAction.Create((AddRowAndColumnDefinitionsTag)rxTag, this.file))); break; case nameof(AddMissingRowDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag.Span, AddMissingRowDefinitionsAction.Create((MissingRowDefinitionTag)rxTag, this.file))); break; case nameof(AddMissingColumnDefinitionsAction): list.AddRange(this.CreateActionSet(rxTag.Span, AddMissingColumnDefinitionsAction.Create((MissingColumnDefinitionTag)rxTag, this.file))); break; case nameof(RowSpanOverflowAction): list.AddRange(this.CreateActionSet(rxTag.Span, RowSpanOverflowAction.Create((RowSpanOverflowTag)rxTag, this.file))); break; case nameof(ColumnSpanOverflowAction): list.AddRange(this.CreateActionSet(rxTag.Span, ColumnSpanOverflowAction.Create((ColumnSpanOverflowTag)rxTag, this.file))); break; case nameof(AddEntryKeyboardAction): list.AddRange(this.CreateActionSet(rxTag.Span, AddEntryKeyboardAction.Create((AddEntryKeyboardTag)rxTag, this.file))); break; case nameof(AddTextBoxInputScopeAction): list.AddRange(this.CreateActionSet(rxTag.Span, AddTextBoxInputScopeAction.Create((AddTextBoxInputScopeTag)rxTag, this.file))); break; } } } catch (Exception e) { RapidXamlPackage.Logger?.RecordException(e); } return(list); }