Notepad++ Plugin Development using C#
-
Hi all,
I am currently using NppPlugins.NET to generate plugins; however, I am very confused as to how to parse the file that I am currently accessing (in the context of NppPlugins.NET ) when the plugin is activated. Can somebody give me some pointers on what I should do, and how I should go about it?
Thanks!
-
private string GetCurrentDocumentText()
{
IntPtr curScintilla = PluginBase.GetCurrentScintilla();
return GetDocumentText(curScintilla);
}private string GetDocumentText(IntPtr curScintilla) { int length = (int)Win32.SendMessage(curScintilla, SciMsg.SCI_GETLENGTH, 0, 0) + 1; StringBuilder sb = new StringBuilder(length); Win32.SendMessage(curScintilla, SciMsg.SCI_GETTEXT, length, sb); return sb.ToString(); }
-