MCPcopy Create free account
hub / github.com/NPP-JSONViewer/JSON-Viewer / InitCommandMenu

Method InitCommandMenu

src/NppJsonViewer/NppJsonPlugin.cpp:115–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void NppJsonPlugin::InitCommandMenu()
116{
117 m_shortcutCommands.SetShortCut(CallBackID::SHOW_DOC_PANEL, {true, true, true, 'J'});
118 m_shortcutCommands.SetCommand(CallBackID::SHOW_DOC_PANEL, MENU_SHOW_JSON_PANEL, Callback::ShowJsonDlg, false);
119
120 m_shortcutCommands.SetShortCut(CallBackID::FORMAT, {true, true, true, 'M'});
121 m_shortcutCommands.SetCommand(CallBackID::FORMAT, MENU_FORMAT_JSON, Callback::FormatJson, false);
122
123 m_shortcutCommands.SetShortCut(CallBackID::COMPRESS, {true, true, true, 'C'});
124 m_shortcutCommands.SetCommand(CallBackID::COMPRESS, MENU_COMPRESS_JSON, Callback::CompressJson, false);
125
126 m_shortcutCommands.SetShortCut(CallBackID::SORT_BY_KEY, {true, true, true, 'K'});
127 m_shortcutCommands.SetCommand(CallBackID::SORT_BY_KEY, MENU_SORT_BY_KEY, Callback::SortJsonByKey, false);
128
129 m_shortcutCommands.SetCommand(CallBackID::SEP_1, MENU_SEPERATOR, NULL, true);
130
131 m_shortcutCommands.SetCommand(CallBackID::SETTING, MENU_SETTING, Callback::OpenSettingDlg, false);
132 m_shortcutCommands.SetCommand(CallBackID::ABOUT, MENU_ABOUT, Callback::ShowAboutDlg, false);
133}
134
135void NppJsonPlugin::InitToolbarIcon()
136{

Callers

nothing calls this directly

Calls 2

SetShortCutMethod · 0.80
SetCommandMethod · 0.80

Tested by

no test coverage detected