Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add XML tags in documentation comments
#1
Adds XML documentation comment tags in currently active IDE window (LibreAutomete, Visual Studio, etc).

Import the attached file (how). Recommended destination folder: \@Triggers and toolbars\Functions

Example. Paste in file "Hotkey triggers".
 
Code:
Copy      Help
        //these 2 lines are optional
        DocComment.FocusCodeEditor = () => DocComment.FocusCodeEditorDefault(); //note: may need to set the VS hotkey
        DocComment.IsMarkdown = () => DocComment.IsMarkdownDefault("Ctrl+Shift+Alt+7"); //note: need to set the VS hotkey
#region Alt
        Triggers.Of.Window(of: "**m Au.Editor.exe||devenv.exe||code.exe");
        hk["Alt+?"] = o => DocComment.ShowTriggers("Alt");
        hk["Alt+B"] = o => DocComment.Tag(s => $"<b>{s}</b>", s => $"**{s}**");
        hk["Alt+I"] = o => DocComment.Tag(s => $"<i>{s}</i>", s => $"*{s}*");
        hk["Alt+C"] = o => DocComment.Tag(s => $"<c>{s}</c>", s => $"`{s}`");
        hk["Alt+P"] = o => DocComment.Tag(s => $"<para>\r\n{s}</para>");
        hk["Alt+S"] = o => DocComment.Tag(s => $"<see cref=\"{s}\"/>");
        hk["Alt+E"] = o => DocComment.ExampleCodeOrException();
        hk["Alt+<"] = o => DocComment.HtmlEncode("<");
        hk["Alt+>"] = o => DocComment.HtmlEncode(">");
        hk["Alt+7"] = o => DocComment.HtmlEncode("&");
        hk["Alt+Q"] = o => DocComment.HtmlEncode();
        hk["Alt+T"] = o => DocComment.HtmlTable();
        hk["Alt+L"] = o => clipboard.paste("<br/>• ");
#endregion
        Triggers.Of.AllWindows();

Also paste this at the start if file "DocComment.cs" is not in the same project folder.
 
Code:
Copy      Help
/*/ c DocComment.cs; /*/

Changes
2023-05-27. Supports multiline selection. Added <para> example.


Attached Files
.zip   DocComment.zip (Size: 2.85 KB / Downloads: 168)


Forum Jump:


Users browsing this thread: 1 Guest(s)