public static SetCommand ( int index, string commandName, System.Action functionPointer, |
||
index | int | |
commandName | string | |
functionPointer | System.Action | |
shortcut | ||
checkOnInit | bool | |
Résultat | void |
/// <summary> /// Called when the plugin menu of the plugin needs to be filled /// We can call UnmanagedExports.NppFuncItems.RefreshItems(); later on if we had stuff /// in the plugin menu via Npp.SetCommand /// </summary> internal static void DoFuncItemsNeeded() { var cmdIndex = 0; AppliMenu.MainMenuCommandIndex = cmdIndex; Npp.SetCommand(cmdIndex++, "Show main menu [Ctrl + Right click]", () => AppliMenu.ShowMainMenu(true)); CodeExplorer.Instance.DockableCommandIndex = cmdIndex; Npp.SetCommand(cmdIndex++, "Toggle code explorer", CodeExplorer.Instance.Toggle); FileExplorer.Instance.DockableCommandIndex = cmdIndex; Npp.SetCommand(cmdIndex, "Toggle file explorer", FileExplorer.Instance.Toggle); }