Skip to content

Commit

Permalink
Release 0.2.0-alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rdipardo committed Feb 8, 2025
1 parent d85ac38 commit 5543eb9
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 55 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches-ignore:
- 'dependabot/**'
pull_request:
branches:
- main
branches-ignore:
- 'dependabot/**'

permissions: # added using https://github.com/step-security/secure-repo
contents: read
Expand Down
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@
<SharedFramework>$(TargetFramework)</SharedFramework>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A functional plugin demo can be built from the project under the [examples/minim

The demo project's output can be validated by running the test project under the [test](test) subtree.

An experimental, *non-functioning* plugin can be built from the project under the [examples/gui] subtree.
A plugin using Windows Forms can be built from the project under the [examples/gui] subtree.
See the [known issues](doc/ISSUES.mkd#windows-forms) to learn more.

### Using Visual Studio
Expand Down
Binary file modified doc/img/npp.dotnet.plugin.gui.demo.toolbar.menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions examples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
<TargetFramework Condition=" '$(BuildingInsideVisualStudio)' == 'true' And '$(TargetFramework)' == '' ">net8.0-windows</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>

</Project>
2 changes: 2 additions & 0 deletions examples/gui/README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ The command line arguments are the following:

Start the Notepad++ application. In the "Plugins" menu, look for ".NET WinForms Demo Plugin" and try one of the commands.

<img alt="GUI plugin menu" src="../../doc/img/npp.dotnet.plugin.gui.demo.toolbar.menu.png" width="800"/>

[portable Notepad++]: ../minimal/README.mkd/#user-content-portable-npp
[general build requirements]: ../../README.mkd/#requirements
[Developer Command Prompt or PowerShell]: https://learn.microsoft.com/visualstudio/ide/reference/command-prompt-powershell
Expand Down
6 changes: 3 additions & 3 deletions lib/Npp.DotNet.Plugin.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>0.1.0.0</VersionPrefix>
<VersionSuffix>alpha.2</VersionSuffix>
<VersionPrefix>0.2.0.0</VersionPrefix>
<VersionSuffix>alpha.1</VersionSuffix>
<Authors>Kasper B. Graversen, Mark Johnston Olson, Robert Di Pardo</Authors>
<Copyright>(c) 2016-2024 Kasper B. Graversen and Contributors</Copyright>
<Copyright>(c) 2016-2025 Kasper B. Graversen and Contributors</Copyright>
<Description>AOT-ready port of the .NET Framework plugin template for Notepad++</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>brand.png</PackageIcon>
Expand Down
104 changes: 57 additions & 47 deletions lib/Npp.DotNet.Plugin/Kbg.NppPluginNET/NppMenuCmdIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace Npp.DotNet.Plugin
{
/// <remarks>Definitions for Notepad++ v8.7.7</remarks>
public enum MenuCmdId : uint
{
IDM = 40000,
Expand Down Expand Up @@ -530,6 +531,7 @@ public enum MenuCmdId : uint
IDM_DROPLIST_MRU_FIRST = (IDR_DROPLIST_MENU + 20),
}

/// <remarks>Definitions for Notepad++ v8.7.7</remarks>
public enum Resource : uint
{
#if !IDC_STATIC
Expand Down Expand Up @@ -831,52 +833,56 @@ public enum Resource : uint
IDR_FILEBROWSER = 1529,
IDR_CLOSETAB = 1530,
IDR_CLOSETAB_INACT = 1531,
IDR_CLOSETAB_HOVERIN = 1532,
IDR_CLOSETAB_HOVERONTAB = 1533,
IDR_CLOSETAB_PUSH = 1534,
IDR_FUNC_LIST_ICO = 1535,
IDR_DOCMAP_ICO = 1536,
IDR_PROJECTPANEL_ICO = 1537,
IDR_CLIPBOARDPANEL_ICO = 1538,
IDR_ASCIIPANEL_ICO = 1539,
IDR_DOCSWITCHER_ICO = 1540,
IDR_FILEBROWSER_ICO = 1541,
IDR_FILEMONITORING = 1542,
IDR_CLOSETAB_DM = 1543,
IDR_CLOSETAB_INACT_DM = 1544,
IDR_CLOSETAB_HOVERIN_DM = 1545,
IDR_CLOSETAB_HOVERONTAB_DM = 1546,
IDR_CLOSETAB_PUSH_DM = 1547,
IDR_DOCLIST = 1548,
IDR_DOCLIST_ICO = 1549,
IDR_FILEBROWSER_ICO2 = 1550,
IDR_FILEBROWSER_ICO_DM = 1551,
IDR_FUNC_LIST_ICO2 = 1552,
IDR_FUNC_LIST_ICO_DM = 1553,
IDR_DOCMAP_ICO2 = 1554,
IDR_DOCMAP_ICO_DM = 1555,
IDR_DOCLIST_ICO2 = 1556,
IDR_DOCLIST_ICO_DM = 1557,
IDR_PROJECTPANEL_ICO2 = 1558,
IDR_PROJECTPANEL_ICO_DM = 1559,
IDR_CLIPBOARDPANEL_ICO2 = 1560,
IDR_CLIPBOARDPANEL_ICO_DM = 1561,
IDR_ASCIIPANEL_ICO2 = 1562,
IDR_ASCIIPANEL_ICO_DM = 1563,
IDR_FIND_RESULT_ICO2 = 1564,
IDR_FIND_RESULT_ICO_DM = 1565,
IDR_PINTAB = 1566,
IDR_PINTAB_INACT = 1567,
IDR_PINTAB_HOVERIN = 1568,
IDR_PINTAB_HOVERONTAB = 1569,
IDR_PINTAB_PINNED = 1570,
IDR_PINTAB_PINNEDHOVERIN = 1571,
IDR_PINTAB_DM = 1572,
IDR_PINTAB_INACT_DM = 1573,
IDR_PINTAB_HOVERIN_DM = 1574,
IDR_PINTAB_HOVERONTAB_DM = 1575,
IDR_PINTAB_PINNED_DM = 1576,
IDR_PINTAB_PINNEDHOVERIN_DM = 1577,
IDR_CLOSETAB_INACT_EMPTY = 1532,
IDR_CLOSETAB_HOVERIN = 1533,
IDR_CLOSETAB_HOVERONTAB = 1534,
IDR_CLOSETAB_PUSH = 1535,
IDR_FUNC_LIST_ICO = 1536,
IDR_DOCMAP_ICO = 1537,
IDR_PROJECTPANEL_ICO = 1538,
IDR_CLIPBOARDPANEL_ICO = 1539,
IDR_ASCIIPANEL_ICO = 1540,
IDR_DOCSWITCHER_ICO = 1541,
IDR_FILEBROWSER_ICO = 1542,
IDR_FILEMONITORING = 1543,
IDR_CLOSETAB_DM = 1544,
IDR_CLOSETAB_INACT_DM = 1545,
IDR_CLOSETAB_INACT_EMPTY_DM = 1546,
IDR_CLOSETAB_HOVERIN_DM = 1547,
IDR_CLOSETAB_HOVERONTAB_DM = 1548,
IDR_CLOSETAB_PUSH_DM = 1549,
IDR_DOCLIST = 1550,
IDR_DOCLIST_ICO = 1551,
IDR_FILEBROWSER_ICO2 = 1552,
IDR_FILEBROWSER_ICO_DM = 1553,
IDR_FUNC_LIST_ICO2 = 1554,
IDR_FUNC_LIST_ICO_DM = 1555,
IDR_DOCMAP_ICO2 = 1556,
IDR_DOCMAP_ICO_DM = 1557,
IDR_DOCLIST_ICO2 = 1558,
IDR_DOCLIST_ICO_DM = 1559,
IDR_PROJECTPANEL_ICO2 = 1560,
IDR_PROJECTPANEL_ICO_DM = 1561,
IDR_CLIPBOARDPANEL_ICO2 = 1562,
IDR_CLIPBOARDPANEL_ICO_DM = 1563,
IDR_ASCIIPANEL_ICO2 = 1564,
IDR_ASCIIPANEL_ICO_DM = 1565,
IDR_FIND_RESULT_ICO2 = 1566,
IDR_FIND_RESULT_ICO_DM = 1567,
IDR_PINTAB = 1568,
IDR_PINTAB_INACT = 1569,
IDR_PINTAB_INACT_EMPTY = 1570,
IDR_PINTAB_HOVERIN = 1571,
IDR_PINTAB_HOVERONTAB = 1572,
IDR_PINTAB_PINNED = 1573,
IDR_PINTAB_PINNEDHOVERIN = 1574,
IDR_PINTAB_DM = 1575,
IDR_PINTAB_INACT_DM = 1576,
IDR_PINTAB_INACT_EMPTY_DM = 1577,
IDR_PINTAB_HOVERIN_DM = 1578,
IDR_PINTAB_HOVERONTAB_DM = 1579,
IDR_PINTAB_PINNED_DM = 1580,
IDR_PINTAB_PINNEDHOVERIN_DM = 1581,
ID_MACRO = 20000,
ID_MACRO_LIMIT = 20499,
ID_USER_CMD = 21000,
Expand Down Expand Up @@ -941,7 +947,7 @@ public enum Resource : uint
IDC_DOSAVEALLTEXT = 1766,
IDD_GOLINE = 2000,
ID_GOLINE_EDIT = (IDD_GOLINE + 1),
ID_CURRLINE = (IDD_GOLINE + 2),
ID_CURRLINE_EDIT = (IDD_GOLINE + 2),
ID_LASTLINE = (IDD_GOLINE + 3),
ID_URHERE_STATIC = (IDD_GOLINE + 4),
ID_UGO_STATIC = (IDD_GOLINE + 5),
Expand Down Expand Up @@ -1032,6 +1038,7 @@ public enum Resource : uint
NPPM_INTERNAL_DOCMODIFIEDBYREPLACEALL = (NOTEPADPLUS_USER_INTERNAL + 79),
NPPM_INTERNAL_DRAWTABBARPINBUTTON = (NOTEPADPLUS_USER_INTERNAL + 80),
NPPM_INTERNAL_DRAWTABBARCLOSEBUTTON = (NOTEPADPLUS_USER_INTERNAL + 81),
NPPM_INTERNAL_DRAWINACTIVETABBARBUTTON = (NOTEPADPLUS_USER_INTERNAL + 82),
NPPM_INTERNAL_REDUCETABBAR = (NOTEPADPLUS_USER_INTERNAL + 83),
NPPM_INTERNAL_LOCKTABBAR = (NOTEPADPLUS_USER_INTERNAL + 84),
NPPM_INTERNAL_DRAWINACIVETAB = (NOTEPADPLUS_USER_INTERNAL + 85),
Expand All @@ -1056,6 +1063,7 @@ public enum Resource : uint
NPPM_INTERNAL_LWALIGN = (NOTEPADPLUS_USER_INTERNAL + 104),
NPPM_INTERNAL_LWINDENT = (NOTEPADPLUS_USER_INTERNAL + 105),
NPPM_INTERNAL_CHECKDOCSTATUS = (NOTEPADPLUS_USER_INTERNAL + 106),
NPPM_INTERNAL_HIDEMENURIGHTSHORTCUTS = (NOTEPADPLUS_USER_INTERNAL + 107),
SCINTILLA_USER = (WM_USER + 2000),
MACRO_USER = (WM_USER + 4000),
WM_MACRODLGRUNMACRO = (MACRO_USER + 02),
Expand All @@ -1079,6 +1087,7 @@ public enum Resource : uint
MENUINDEX_LIST = 14,
}

/// <remarks>Definitions for Notepad++ v8.7.7</remarks>
public enum Preference : uint
{
PREF_MSG_SETGUITOOLICONSSET = (WM_USER + 4),
Expand All @@ -1097,6 +1106,7 @@ public enum Preference : uint
IDC_CHECK_LOCK = (IDD_PREFERENCE_SUB_GENRAL + 8),
IDC_CHECK_DRAWINACTIVE = (IDD_PREFERENCE_SUB_GENRAL + 9),
IDC_CHECK_ORANGE = (IDD_PREFERENCE_SUB_GENRAL + 10),
IDC_CHECK_INACTTABDRAWBUTTON = (IDD_PREFERENCE_SUB_GENRAL + 11),
IDC_CHECK_ENABLETABCLOSE = (IDD_PREFERENCE_SUB_GENRAL + 12),
IDC_CHECK_DBCLICK2CLOSE = (IDD_PREFERENCE_SUB_GENRAL + 13),
IDC_CHECK_ENABLEDOCSWITCHER = (IDD_PREFERENCE_SUB_GENRAL + 14),
Expand Down
2 changes: 1 addition & 1 deletion lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A .NET (Core) library for developing Notepad++ plugins

### License

(c) 2016-2024 Kasper B. Graversen, Mark Johnston Olson, Robert Di Pardo
(c) 2016-2025 Kasper B. Graversen, Mark Johnston Olson, Robert Di Pardo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
8 changes: 7 additions & 1 deletion scripts/generate_menu_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ def generate(out: StringIO):
with open(hdr_path, 'w', encoding='utf-8') as msgs:
msgs.write(get_resource(val))

print(f"\n public enum {key[1]} : uint\n {{", file=out)
version = \
re.search(r'(?i)(?:^.*NOTEPAD_PLUS_VERSION L"Notepad\+\+ )?(?P<version>.*)"\s*$',
get_resource(RESOURCE_H)[:1024], re.MULTILINE)

version = version.groupdict()['version'] if version is not None else ''
print(f"\n /// <remarks>Definitions for Notepad++ {version}</remarks>", file=out)
print(f" public enum {key[1]} : uint\n {{", file=out)

with open(hdr_path, 'r', encoding='utf-8') as hdr:
for line in hdr.read().splitlines():
Expand Down

0 comments on commit 5543eb9

Please sign in to comment.