From a564ea65b893cb7360c771fe132ada84a40c0a7a Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sun, 28 Jan 2024 17:57:14 +0100 Subject: [PATCH] Add "Plugin Communication Guide" & "Get Plugin Demo Source Code" commands --- .github/workflows/CI_build.yml | 6 +++--- src/PluginDefinition.cpp | 16 ++++++++++++++++ src/PluginDefinition.h | 5 ++++- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index d3699ad..72ec1e2 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -34,7 +34,7 @@ jobs: - name: Archive artifacts for x64 if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pluginDemo_${{ steps.tagName.outputs.tag }}_${{ matrix.build_platform }}.zip path: pluginDemo_${{ steps.tagName.outputs.tag }}_${{ matrix.build_platform }}.zip @@ -48,7 +48,7 @@ jobs: - name: Archive artifacts for Win32 if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Release' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pluginDemo_${{ steps.tagName.outputs.tag }}_${{ matrix.build_platform }}.zip path: pluginDemo_${{ steps.tagName.outputs.tag }}_${{ matrix.build_platform }}.zip @@ -62,7 +62,7 @@ jobs: - name: Archive artifacts for ARM64 if: matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pluginDemo_${{ steps.tagName.outputs.tag }}_${{ matrix.build_platform }}.zip path: pluginDemo_${{ steps.tagName.outputs.tag }}_${{ matrix.build_platform }}.zip diff --git a/src/PluginDefinition.cpp b/src/PluginDefinition.cpp index d3e6208..9d298da 100644 --- a/src/PluginDefinition.cpp +++ b/src/PluginDefinition.cpp @@ -141,6 +141,11 @@ void commandMenuInit() setCommand(14, TEXT("---"), NULL, NULL, false); setCommand(DOCKABLE_DEMO_INDEX, TEXT("Dockable Dialog Demo"), DockableDlgDemo, NULL, false); + + setCommand(16, TEXT("---"), NULL, NULL, false); + + setCommand(17, TEXT("Plugin Communication Guide"), goToPluginCommunicationGuide, NULL, false); + setCommand(18, TEXT("Get Plugin Demo Source Code"), goToPluginDemoRepo, NULL, false); } @@ -307,6 +312,8 @@ void insertCurrentPath(int which) #endif } + + void insertCurrentFullPath() { insertCurrentPath(FULL_CURRENT_PATH); @@ -458,3 +465,12 @@ void DockableDlgDemo() _goToLine.display(); } +void goToPluginCommunicationGuide() +{ + ::ShellExecute(NULL, TEXT("open"), TEXT("https://npp-user-manual.org/docs/plugin-communication/"), NULL, NULL, SW_SHOWNORMAL); +} + +void goToPluginDemoRepo() +{ + ::ShellExecute(NULL, TEXT("open"), TEXT("https://github.com/npp-plugins/plugindemo"), NULL, NULL, SW_SHOWNORMAL); +} diff --git a/src/PluginDefinition.h b/src/PluginDefinition.h index 92256a1..2ec604d 100644 --- a/src/PluginDefinition.h +++ b/src/PluginDefinition.h @@ -36,7 +36,7 @@ const TCHAR NPP_PLUGIN_NAME[] = TEXT("Notepad++ plugin demo"); // // Here define the number of your plugin commands // -const int nbFunc = 16; +const int nbFunc = 19; // @@ -85,6 +85,9 @@ void getFileNamesDemo(); void getSessionFileNamesDemo(); void saveCurrentSessionDemo(); void DockableDlgDemo(); +void goToPluginCommunicationGuide(); +void goToPluginDemoRepo(); + #endif //PLUGINDEFINITION_H