Community
    • Login

    Creating a 'find in files and click' type window

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    8 Posts 5 Posters 663 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ThosRTannerT
      ThosRTanner
      last edited by ThosRTanner

      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)

      mkupperM PeterJonesP Alan KilbornA 3 Replies Last reply Reply Quote 0
      • mkupperM
        mkupper @ThosRTanner
        last edited by

        @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.

        ThosRTannerT 1 Reply Last reply Reply Quote 2
        • PeterJonesP
          PeterJones @ThosRTanner
          last edited by

          @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

          ThosRTannerT 1 Reply Last reply Reply Quote 2
          • ThosRTannerT
            ThosRTanner @PeterJones
            last edited by

            @PeterJones Thank you!

            1 Reply Last reply Reply Quote 0
            • ThosRTannerT
              ThosRTanner @mkupper
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • Alan KilbornA
                Alan Kilborn @ThosRTanner
                last edited by Alan Kilborn

                @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.

                ThosRTannerT 1 Reply Last reply Reply Quote 2
                • ThosRTannerT
                  ThosRTanner @Alan Kilborn
                  last edited by

                  @Alan-Kilborn Not sure how I can be more specific than mentioning the files in question that were apparently cloned.

                  rdipardoR 1 Reply Last reply Reply Quote 0
                  • rdipardoR
                    rdipardo @ThosRTanner
                    last edited by

                    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
                    
                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors