https://github.com/kvanttt/nppnetinf
Notepad++ .NET Infrastructure
https://github.com/kvanttt/nppnetinf
dotnet infrastructure notepad-plus-plus notepadplusplus plugin wrapper
Last synced: 6 months ago
JSON representation
Notepad++ .NET Infrastructure
- Host: GitHub
- URL: https://github.com/kvanttt/nppnetinf
- Owner: KvanTTT
- License: apache-2.0
- Created: 2017-11-05T14:21:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-03-15T17:11:26.000Z (almost 4 years ago)
- Last Synced: 2025-01-24T07:43:38.685Z (12 months ago)
- Topics: dotnet, infrastructure, notepad-plus-plus, notepadplusplus, plugin, wrapper
- Language: C#
- Size: 285 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Notepad++ .NET Infrastructure
This projects based on [NotepadPlusPlusPluginPack.Net](https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net)
but doesn't required installed Visual C++ and other stuff except of this submodule
(`LibToolPath` and `LibToolDllPath` has been deleted from NppPlugin.DllExport.targets).
Also it's a bit easy to use.
The main goal is independence of plugin and infrastructure code and simplicity.
## Steps to build your own Notepad++ plugin
1. Create plugin solution with .NET project like `MyAwesomePlugin`.
2. Add submodule to your repository.
3. Add a line ``
to MyAwesomePlugin.csproj. This target executed after every build and changes
assembly for corresponding to Notepad++ format.
4. Create subdirectory `NppNetInf` inside your project `MyAwesomePlugin` directory
and "Add As Link" all *.cs files from NppNetInf submodule (Win32.cs, Scintilla.cs, PluginMain.cs, etc.).
5. Add a class `Main` that implements `PluginMain` and override required methods
and properties (`PluginName`, `CommandMenuInit`). Also you can override other
optional methods
(`OnNotification(ScNotification notification)`, `PluginCleanUp()`, `SetToolBarIcon`).
6. Choose platform (x86 or x64), build project and move compilied assembly to
Notepad++ plugins directory
(as usual `C:\Program Files\Notepad++\plugins` or `C:\Program Files (x86)\Notepad++\plugins`).
7. Open Notepad++ and enjoy your awesome plugin!
## How it works
At start this infrastructure tries to find plugin `Main` class via reflection.
Such `Main` class should implement `PluginMain` abstract class.
## Plugin demo
[NppGist](https://github.com/KvanTTT/NppGist) is built on NppNetInf. It has
configured CI with both x86 and x64 builds.
## License
Apache 2.0.