Creating a 'find in files and click' type window
-
Hi.
There’s a notepad++ extension which hasn’t worked in a while and I thought I’d clone it and try to build it as a way of learning (specifically) how to create a console-type window (like, for instance, the result of find in files, where it gets filled with lines you can click on, taking you to the file and line in question, or the sort where you get your compile time errors when you run a build from the editor).
After two days I’ve got it actually building and talking to notepad++.
However, as soon as it tries to create the ‘console window’ for want of a better phrase, it crashes. At this point it is buried deep in a lot of code that has been cloned from notepad++ several years ago (about a dozen files, copyright notices around 2003-2005, including Docking.h, DockingDlgInterface.h, StaticDialog.h/cpp. Toolbar.h/cpp, …)
Is it expected to have to clone those to make such a window, and if so do i need to copy even more of the notepad++ code, or is there an API that I should be using (I’ve failed to find this, but it is quite possible I’m looking in completely the wrong place)
-
@ThosRTanner - Your message is vague as to what you are trying to do and what is not working. I don’t think anyone can offer specific advice.
One thought I had was to download the portable versions of various old versions of Notepad++, copy your plugin files into those and to verify that the plugin works as expected in various older versions and does not work in various newer versions. You start the older versions using the
-multiInst
command line option to make sure you are running that .exe.The first goal of this test is to verify that the plugin works on your computer with older versions. The second goal is to determine at which point in the Notepad++ versions the plugin broke.
If you can, report specifics such as for example, that the plugin is confirmed to work with Notepad++ v8.5.2 and does not work with v8.5.3, then you are much more likely to get specific advice on what you should look at in the code for the plugin.
-
@ThosRTanner said in Creating a ‘find in files and click’ type window:
buried deep in a lot of code that has been cloned from notepad++ several years ago (about a dozen files, copyright notices around 2003-2005, including Docking.h, DockingDlgInterface.h, StaticDialog.h/cpp. Toolbar.h/cpp, …)
Those aren’t from the core Notepad++ codebase. Those are from the Plugin Template. To be compatible with modern Notepad++, you should grab the most recent, from https://github.com/npp-plugins/plugintemplate/tree/master/src/DockingFeature
-
@PeterJones Thank you!
-
@mkupper I’m just trying to build it so I can get an example of how the code works. I was trying to find out why it had what appeared to be files copied from inside notepad. Which @PeterJones has sorted.
-
@ThosRTanner said in Creating a ‘find in files and click’ type window:
There’s a notepad++ extension which hasn’t worked in a while and I thought I’d clone it
It also might have helped if you’d specified the name of this mysterious plugin. Someone with knowledge of that plugin might have chimed in. But as it is, and has been pointed out, your posting is filled with vague statements and little specifics, which is a bad thing when you are asking for assistance.
-
@Alan-Kilborn Not sure how I can be more specific than mentioning the files in question that were apparently cloned.
-
I think the source of the confusion is the outdated copyright notice, e.g.,
// This file is part of Notepad++ project // Copyright (C)2006 Jens Lorenz <jens.plugin.npp@gmx.de> // . . .
@ThosRTanner, just look at the git history and you’ll see that these files are not actually 17 years old.
git clone https://github.com/npp-plugins/plugintemplate.git cd plugintemplate git log -p -- src/DockingFeature/*.h