Browse Source

Fixed "switch" code snippet, added "ifnull" and "ifnotnull" snippets.

addin-manager-package-subdirectories
Andreas Weizel 13 years ago
parent
commit
1a49d18ec7
  1. 15
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs

15
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Snippets/SnippetManager.cs

@ -46,6 +46,18 @@ namespace ICSharpCode.AvalonEdit.AddIn.Snippets
Text = "if (${condition}) {\n\t${Selection}\n}", Text = "if (${condition}) {\n\t${Selection}\n}",
Keyword = "if" Keyword = "if"
}, },
new CodeSnippet {
Name = "ifnull",
Description = "if-null statement",
Text = "if (${condition} == null) {\n\t${Selection}\n}",
Keyword = "if"
},
new CodeSnippet {
Name = "ifnotnull",
Description = "if-not-null statement",
Text = "if (${condition} != null) {\n\t${Selection}\n}",
Keyword = "if"
},
new CodeSnippet { new CodeSnippet {
Name = "ifelse", Name = "ifelse",
Description = "if-else statement", Description = "if-else statement",
@ -104,8 +116,7 @@ namespace ICSharpCode.AvalonEdit.AddIn.Snippets
new CodeSnippet { new CodeSnippet {
Name = "switch", Name = "switch",
Description = "Switch statement", Description = "Switch statement",
// dynamic switch snippet (inserts switch body dependent on condition) Text = "switch (${condition}) {\n\t${Caret}\n}",
Text = "switch (${condition}) {\n\t${refactoring:switchbody}\n}",
Keyword = "switch" Keyword = "switch"
}, },
new CodeSnippet { new CodeSnippet {

Loading…
Cancel
Save