All the plugins which are compatible with v5.0.3 (which is an ANSI application) will be compatible with ANSI release, but not with Unicode release.
As well, all the Unicode plugins (which come with Unicode Notepad++) are not compatible with Notepad++ ANSI mode.
In order to make your plugins compatible with Unicode Notepad++ (Unicode release will be the main stream on the future versions), you should include the newest PluginsInterface.h ( http://notepad-plus.svn.sourceforge.net/viewvc/notepad-plus/PowerEditor/src/MISC/PluginsManager/PluginInterface.h?revision=307&view=markup ) in your project, then compile your project by setting the symbol UNICODE (with #define UNICODE in your header file or set Character Set option from "Use Multi-Byte Character Set" to "Use Unicode Character Set" in Configuration Properties->General via project properties dialog in your VC studio).
Keep one thing in mind : Send all unicode messages to Notepad++ in unicode mode, but send ansi message to scintilla in both ANSI and UNICODE mode.
I've updated the newest (unicode-ready) version of the files in NppPlugins/Common from CVS to my development folder. But when compiling my plugin, I'm unable to compile ToolBar.cpp:
..\..\..\Common\Ccpp\ToolBar.cpp(21) : fatal error C1083: Cannot open include file: 'Shortcut.h': No such file or directory
That file (Shortcut.h) belongs to Notepad++ code, and from what I see, it is specific to Notepad++, and not for plugins.
Removing the #include "Shortcut.h" yields the following compile error
..\..\..\Common\Ccpp\ToolBar.cpp(244) : error C3861: 'getNameStrFromCmd': identifier not found
This is in the function void ToolBar::doPopop(POINT chevPoint)
This function is for the toolbar chevron popup, so its quite useful for plugins to have also. May I offer a suggestion for this compile error? It is to have a callback function from class ToolBar, with a signature like 'getNameStrFromCmd' function, to allow the individual plugins to supply their own popup menu item name?
Of course that was just a suggestion, anything else is welcome too. The main purpose is just to inform of the compile error. :-)
Regards,
LoonyChewy.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I added the file into CVS. There is no responsibility to Don. If you need to change something in the code or you have a suggestion to make it please let me know. I will test it and do a check in.
Best Regards
Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I may be wrong at that point, but the unicode Notepad++ brakes custom lexer:
GetLexerName requires Widechar, but Scintilla still uses Char.
So you will get those lexer in Notepad++, but they don't work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am converting my plugin project to Unicode. I upgraded the interface header file, changed project to use Unicode and fixed all compile errors. But notepad++ still report it is ANSI plugin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From v5.1, Notepad++ is a true Unicode-compliant application.
( Please check Notepad++ v5.1 beta release announce here :
http://sourceforge.net/forum/message.php?msg_id=5301167 )
All the plugins which are compatible with v5.0.3 (which is an ANSI application) will be compatible with ANSI release, but not with Unicode release.
As well, all the Unicode plugins (which come with Unicode Notepad++) are not compatible with Notepad++ ANSI mode.
In order to make your plugins compatible with Unicode Notepad++ (Unicode release will be the main stream on the future versions), you should include the newest PluginsInterface.h ( http://notepad-plus.svn.sourceforge.net/viewvc/notepad-plus/PowerEditor/src/MISC/PluginsManager/PluginInterface.h?revision=307&view=markup ) in your project, then compile your project by setting the symbol UNICODE (with #define UNICODE in your header file or set Character Set option from "Use Multi-Byte Character Set" to "Use Unicode Character Set" in Configuration Properties->General via project properties dialog in your VC studio).
Keep one thing in mind : Send all unicode messages to Notepad++ in unicode mode, but send ansi message to scintilla in both ANSI and UNICODE mode.
5 plugins are Unicode ready, you can check the projects here :
1. DocMonitor : http://sourceforge.net/project/showfiles.php?group_id=189927&package_id=231308&release_id=624532
2. MIME tools : http://sourceforge.net/project/showfiles.php?group_id=189927&package_id=252551&release_id=624804
3. Ftp_synchronize : http://sourceforge.net/project/showfiles.php?group_id=189927&package_id=245189&release_id=624543
4. NppExport : http://sourceforge.net/project/showfiles.php?group_id=189927&package_id=256744&release_id=624533
5. NppAutoIndent : http://sourceforge.net/project/showfiles.php?group_id=189927&package_id=288727&release_id=627180
Here you can download Notepad++ v5.1 beta here to test with your plugins :
http://notepad-plus.sourceforge.net/commun/misc/npp.v5.1.beta.zip
Feel free to post your questions here.
Don
hi Don.
what does the DocMonitor plugin do?
I have the "start Monitor", but i can't seem to find what is does.
thanks.
DocMonitor plugin monitors your current document and update it (if any change).
Don
Hi,
I've updated the newest (unicode-ready) version of the files in NppPlugins/Common from CVS to my development folder. But when compiling my plugin, I'm unable to compile ToolBar.cpp:
..\..\..\Common\Ccpp\ToolBar.cpp(21) : fatal error C1083: Cannot open include file: 'Shortcut.h': No such file or directory
That file (Shortcut.h) belongs to Notepad++ code, and from what I see, it is specific to Notepad++, and not for plugins.
Removing the #include "Shortcut.h" yields the following compile error
..\..\..\Common\Ccpp\ToolBar.cpp(244) : error C3861: 'getNameStrFromCmd': identifier not found
This is in the function void ToolBar::doPopop(POINT chevPoint)
This function is for the toolbar chevron popup, so its quite useful for plugins to have also. May I offer a suggestion for this compile error? It is to have a callback function from class ToolBar, with a signature like 'getNameStrFromCmd' function, to allow the individual plugins to supply their own popup menu item name?
Of course that was just a suggestion, anything else is welcome too. The main purpose is just to inform of the compile error. :-)
Regards,
LoonyChewy.
Hi LoonyChewy,
I added the file into CVS. There is no responsibility to Don. If you need to change something in the code or you have a suggestion to make it please let me know. I will test it and do a check in.
Best Regards
Jens
I may be wrong at that point, but the unicode Notepad++ brakes custom lexer:
GetLexerName requires Widechar, but Scintilla still uses Char.
So you will get those lexer in Notepad++, but they don't work.
I've added a patch for that issue in the bug tracker.
Any word on getting the patch into an official release?
How does notepad++ detect the type of plugin?
I am converting my plugin project to Unicode. I upgraded the interface header file, changed project to use Unicode and fixed all compile errors. But notepad++ still report it is ANSI plugin.
Firstly, make sure you use the latest PluginInterface.h :
http://notepad-plus.svn.sourceforge.net/viewvc/notepad-plus/PowerEditor/src/MISC/PluginsManager/PluginInterface.h?revision=307&view=markup
You should have the following function declaration :
#ifdef UNICODE
extern "C" __declspec(dllexport) BOOL isUnicode();
#endif //UNICODE
and activate UNICODE symbol in your visual studio or define it manually in your source code.
Don