protected override MultiCommandCollection CreateCommands(Snippet snippet) { var commands = new MultiCommandCollection(); if (snippet.HasTag(KnownTags.GenerateAlternativeShortcut)) { commands.AddMultiCommand(CommandUtility.ShortcutToLowercaseCommand); commands.AddMultiCommand(CommandUtility.GenerateAlternativeShortcutCommand); } return(commands); }
protected override MultiCommandCollection CreateCommands(Snippet snippet) { var commands = new MultiCommandCollection(); if (snippet.HasTag(KnownTags.GenerateDeclarationAndDefinition)) { commands.AddMultiCommands(new Command[] { CommandUtility.Declaration, CommandUtility.Definition }); } commands.AddMultiCommands(GetTypeCommands(snippet)); if (snippet.HasTag(KnownTags.GenerateCollection)) { commands.AddMultiCommands(GetNonImmutableCollectionCommands(snippet)); } if (snippet.HasTag(KnownTags.GenerateImmutableCollection)) { commands.AddMultiCommands(GetImmutableCollectionCommands(snippet)); } commands.AddMultiCommands(GetAccessModifierCommands(snippet)); if (snippet.HasTag(KnownTags.GenerateStaticModifier)) { commands.AddMultiCommand(CommandUtility.StaticCommand, duplicateWhenEmpty: true); } if (snippet.HasTag(KnownTags.GenerateVirtualModifier)) { commands.AddMultiCommand(CommandUtility.VirtualCommand, duplicateWhenEmpty: true); } if (snippet.HasTag(KnownTags.GenerateConstModifier)) { commands.AddMultiCommand(CommandUtility.ConstCommand, duplicateWhenEmpty: true); } if (snippet.HasTag(KnownTags.GenerateConstExprModifier)) { commands.AddMultiCommand(CommandUtility.ConstExprCommand, duplicateWhenEmpty: true); } if (snippet.HasTag(KnownTags.GenerateInlineModifier)) { commands.AddMultiCommand(CommandUtility.InlineCommand, duplicateWhenEmpty: true); } if (snippet.HasTag(KnownTags.GenerateInitializer)) { commands.AddMultiCommand(CommandUtility.InitializerCommand, duplicateWhenEmpty: true); } return(commands); }