Community
    • Login

    My first plugin development: CollectionInterface [was: Need help with getting started using C++ Plugin Template]

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    67 Posts 8 Posters 3.2k 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.
    • PeterJonesP
      PeterJones @Lycan Thrope
      last edited by

      @Lycan-Thrope ,

      it looks like it’s an HTML file, rather than an XML file.

      apparently, when @rdipardo submitted to the collection, the JSON was set to point to the HTML wrapper for the gist. So it’s a data problem (which the validator should have caught) in the repo, not a problem with the plugin.

      Lycan ThropeL 1 Reply Last reply Reply Quote 2
      • Lycan ThropeL
        Lycan Thrope @PeterJones
        last edited by Lycan Thrope

        @PeterJones ,
        Yeah I kind of figured that, but was just relaying the find, even though it isn’t the plugin’s fault.

        I know you have the list check the repository, rather than checking the user’s to see if they already have it, and then it dawned on me, that they might need to redownload an uncorrupted version if they screwed something up…although I’d have deleted it first before downloading again, I wonder if it’s worth it to add that check to see if they really want to redownload it. No harm no foul if it actually downloads overwriting a bad one, but if they made changes, they wanted to keep, then it might be a problem…but it’s their problem for not backing it up. :-)

        1 Reply Last reply Reply Quote 1
        • rdipardoR
          rdipardo @Lycan Thrope
          last edited by rdipardo

          @Lycan-Thrope said in Need help with getting started using C++ Plugin Template:

          they worked with what appears to be one exception. Vim by @rdipardo .

          If I understand correctly, wouldn’t the same thing happen with any UDL whose repository field is not a static XML resource?

          If that’s the case, a few more entries appear to need fixing:

          $ curl -sSL https://raw.githubusercontent.com/notepad-plus-plus/userDefinedLanguages/refs/heads/master/udl-list.json |\
            jq -MCr '
              .UDLs[]
              | select(.repository | length > 0 and (test("((^https?://raw)|\\.xml$)") | not))
              | ."id-name"'
          
          AgenaUDL
          AMXX_1.8.3_OciXCrom
          AsteriskExtensionLanguage-AEL_by-eyzel
          AuditCommandLanguage-ACL_byJChen
          Fortinet_FortiOS_FGT_by_SSavaso_6_4_14
          GPD.byRajendraSingh
          jai.udl
          jQuery_byJamesAllardice
          Klipper-GCODE-Dark-by-Iron3eagle
          Liquid_dark_byFabbroDan
          markdown-plus-plus
          MSC-Nastran_by-onurarifyasa
          MSC-Patran_by-onurarifyasa
          Objective-C++_byLattHsiang
          PowerBuilder_DM_byFa0lin
          Smali_byJasi2169
          TinyFugue_byYrwin
          Vimscript_Obsidian_by_rdipardo
          zenscript
          
          Lycan ThropeL 1 Reply Last reply Reply Quote 2
          • Lycan ThropeL
            Lycan Thrope @rdipardo
            last edited by Lycan Thrope

            @rdipardo ,
            I don’t disagree, but I just chose yours because yours has, like mine, a package of UDL, AC and FL, and it was one I tried to see in the UDL list that made me notice it, which is why it caught my attention, and @PeterJones has pointed out it’s not the focus of this testing.

            @PeterJones has also pointed out that he’s going to run check on the entire repository any way and address these issues, if his plugin is going to address automating installation of UDL’s into NPP, plus address the changes that have come about from the switching from the old way the files were referenced to the way they are now referenced for download by users. Nothing was meant @rdipardo by picking yours out, it was just a fluke that I found it and pointed it out, and the issue has been explained to me why, what I found happened.

            1 Reply Last reply Reply Quote 1
            • PeterJonesP
              PeterJones
              last edited by

              @Lycan-Thrope said,

              he’s going to run check on the entire repository any way and address these issues

              I have improved the validators, and was able to prove it would catch all the ones @rdipardo mentioned. I also confirmed it now catches the autoCompletion-filename-doesnt-match-UDL-internal-name. After verifying those worked, I updated the JSON to fix the non-XML repository: URLs, and updated the autoCompletion filenames to make them work correctly.

              v1.0.0-RC1

              • Use the correct autoCompletion filename
              • Ask for permission before overwriting existing XML files
              • Fixed some behind-the-scenes stuff compared to v1.0.0-beta

              I’m hoping to get the PluginList testing done soon, and to have submitted the v1.0.0 final version to the nppPluginList before Don closes submissions for NPP v8.8.

              Lycan ThropeL CoisesC 4 Replies Last reply Reply Quote 2
              • Lycan ThropeL
                Lycan Thrope @PeterJones
                last edited by Lycan Thrope

                @PeterJones ,
                This is definitely ready so far. I tested very late, as best I could, with both portable and standard and it works as needed. It downloaded VIM on the portable, so i took it over to the standard install and ran it again. It flagged the already existing files, and I told it to go ahead, and it paused at UAC, said that it was already installed, told it to go ahead and it did. On restart, VIM was visible in the UDL list.

                I can check more of the languages later, but I think it’s good to go for a RC version, and then add the needed improvements you’ve already documented from there.

                I need to get some sleep now. :-)

                1 Reply Last reply Reply Quote 1
                • Lycan ThropeL
                  Lycan Thrope @PeterJones
                  last edited by Lycan Thrope

                  @PeterJones ,
                  Okay…another long night. Anyway, I used the portable to download that entire list that @rdipardo provided, and they all download just fine.

                  Now, did you know or make it so we can download multiple languages and reboot just once to get them all installed? I know we can’t select mutliple, and download them, but after downloading a language, just going back to the list and selecting another one, allows you to continue downloading languages until they’re all done. I was doing one at a time and reboot and figured, what the heck, try and break it…but it didn’t, it worked. I even tried to redownload VIM package again, and it let me cancel each file and just continue downloading languages until I had them all done at once. I think that’s sufficient for now, being able to download more than one language at a time without rebooting.

                  Anyway, if you want me to test it in the standard version, let me know. So far everything else has worked in both, but I can verify it if you want. Time for me to hit the sack again, and then I have to get back to taking my Learn C++ in 4 Hours video course, so I can be really dangerous. :-)

                  1 Reply Last reply Reply Quote 1
                  • Lycan ThropeL
                    Lycan Thrope @PeterJones
                    last edited by Lycan Thrope

                    @PeterJones ,
                    Okay, just finished testing it in my 8.7.7 Standard install, and it all worked the same as in the portable, even after I canceled the VIM reinstall.

                    I did make note this time, however, that I downloaded an excessive amount of UDL’s and since I haven’t looked in the code, there appears to be a limit of 30 UDL’s that can be displayed, other than the default User Defined Language menu dropdown and the User-Defined at the bottom of the Language menu dialog.

                    Since you do check to see if a UDL is installed, might it make sense to notify the user that the limit of visible UDL’s that will be selectable in the Language list, has been reached, if there is a total number of 30 or more in the UDL directory? Even with the scrollable arrows, all that will show, is the 30 UDL’s and those two UDL texts mentioned above. I guess essentially 32 in that Language Dialog UDL section.

                    Other than that finding, the 1.0 RC is ready for release and for others to nitpick additional features. <grin>

                    1 Reply Last reply Reply Quote 0
                    • CoisesC
                      Coises @PeterJones
                      last edited by

                      @PeterJones

                      I notice your first release has Win32, x64 and ARM64 versions.

                      How do you go about testing the ARM64 version? I’ve left that out of all my plugin work so far, because I haven’t a clue how to verify that it works at all.

                      PeterJonesP 1 Reply Last reply Reply Quote 1
                      • PeterJonesP
                        PeterJones @Coises
                        last edited by

                        @Coises,

                        How do you go about testing the ARM64 version? I’ve left that out of all my plugin work so far, because I haven’t a clue how to verify that it works at all.

                        I don’t. I’m following the time-honored tradition of releasing software untested, and hoping that any users will find edge cases for me. :-)

                        Given that it works as 32b and 64b on Intel processors, and I’m not doing anything that is out-of-the-ordinary, I am hoping that there aren’t any ARM64-specific bugs

                        1 Reply Last reply Reply Quote 4
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors