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

Method ProcessNotification

src/NppJsonViewer/NppJsonPlugin.cpp:40–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void NppJsonPlugin::ProcessNotification(const SCNotification* notifyCode)
41{
42 switch (notifyCode->nmhdr.code)
43 {
44 case NPPN_TBMODIFICATION:
45 {
46 SetMenuIcon();
47 break;
48 }
49
50 case NPPN_SHUTDOWN:
51 {
52 PluginCleanup();
53 break;
54 }
55
56 case NPPN_BUFFERACTIVATED:
57 {
58 if (m_pJsonViewDlg && m_bNppReady && !m_bAboutToClose)
59 {
60 m_pJsonViewDlg->HandleTabActivated();
61 }
62 break;
63 }
64
65 case NPPN_BEFORESHUTDOWN:
66 {
67 m_bAboutToClose = true;
68 break;
69 }
70
71 case NPPN_READY:
72 {
73 // This is workaround where dialog does not show tree on launch
74 if (m_pJsonViewDlg && m_pJsonViewDlg->isVisible() && !m_bAboutToClose)
75 {
76 ::SendMessage(m_pJsonViewDlg->getHSelf(), WM_COMMAND, IDC_BTN_REFRESH, 0);
77 m_pJsonViewDlg->UpdateTitle();
78 }
79 m_bNppReady = true;
80 break;
81 }
82
83 default:
84 return;
85 }
86}
87
88LRESULT NppJsonPlugin::MessageProc(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
89{

Callers 1

beNotifiedFunction · 0.80

Calls 2

HandleTabActivatedMethod · 0.80
UpdateTitleMethod · 0.80

Tested by

no test coverage detected