diff --git a/IDE/src/Commands.bf b/IDE/src/Commands.bf index f0b2de76..c7eeb2cf 100644 --- a/IDE/src/Commands.bf +++ b/IDE/src/Commands.bf @@ -194,6 +194,8 @@ namespace IDE Add("Close Document", new () => { gApp.[Friend]TryCloseCurrentDocument(); }); Add("Close Panel", new () => { gApp.[Friend]TryCloseCurrentPanel(); }); Add("Close Workspace", new => gApp.[Friend]Cmd_CloseWorkspaceAndSetupNew); + Add("Comment Block", new => gApp.[Friend]CommentBlock); + Add("Comment Lines", new => gApp.[Friend]CommentLines); Add("Comment Selection", new => gApp.[Friend]CommentSelection); Add("Compile File", new => gApp.Cmd_CompileFile); Add("Debug All Tests", new () => { gApp.[Friend]RunTests(true, true); }); diff --git a/IDE/src/IDEApp.bf b/IDE/src/IDEApp.bf index 0131b705..f6dbf6c4 100644 --- a/IDE/src/IDEApp.bf +++ b/IDE/src/IDEApp.bf @@ -2424,6 +2424,22 @@ namespace IDE sewc.DuplicateLine(); } + [IDECommand] + void CommentBlock() + { + var sewc = GetActiveSourceEditWidgetContent(); + if (sewc != null) + sewc.CommentBlock(); + } + + [IDECommand] + void CommentLines() + { + var sewc = GetActiveSourceEditWidgetContent(); + if (sewc != null) + sewc.CommentLines(); + } + [IDECommand] void CommentSelection() { @@ -5386,6 +5402,8 @@ namespace IDE advancedEditMenu.AddMenuItem(null); AddMenuItem(advancedEditMenu, "Make Uppercase", "Make Uppercase"); AddMenuItem(advancedEditMenu, "Make Lowercase", "Make Lowercase"); + AddMenuItem(advancedEditMenu, "Comment Block", "Comment Block"); + AddMenuItem(advancedEditMenu, "Comment Lines", "Comment Lines"); AddMenuItem(advancedEditMenu, "Comment Selection", "Comment Selection"); AddMenuItem(advancedEditMenu, "Uncomment Selection", "Uncomment Selection"); AddMenuItem(advancedEditMenu, "Reformat Document", "Reformat Document");