• Login
Community
  • Login

Support for Plugins Admin & NppPluginList

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
45 Posts 26 Posters 59.7k 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.
  • B
    Bas de Reuver
    last edited by Bas de Reuver Oct 28, 2021, 12:21 PM Oct 28, 2021, 12:19 PM

    I’m running into the same problem as @Stan-Mitchell130 's GEDCOM plug-in with my CSV Lint plugin. The plug-in provides a custom lex() function which requires an .XML file for the syntax highlighting colors. When installing the plug-in this XML file should be placed in the user’s \config\ folder, like so:

    CSVLint.dll ----> C:\Program Files\Notepad++\plugins\CSVLint\CSVLint.dll
    CSVLint.xml —> %USERPROFILE%\AppData\Roaming\Notepad++\plugins\config\CSVLint.xml

    I’ve added the installation .zip files (both 32bit and 64bit) to the Plugins Admin list and the .zip files contains just the two files, like so:

    CSVLint.zip

    • CSVLint.dll
    • CSVLint.xml

    But this places the CSVLint.xml file in the same folder as the Program Files\Notepad++\plugins\CSVLint\ folder, so this is incorrect. After you install the plug-in and start Notepad++ wil give an error “\plugins\Config\CSVLint.xml is missing. CSVLint.dll is not compatible… etc.”

    I noticed that the GedcomLexer also provides an XML file but it’s placed in a subfolder in the .zip called “Config”. However, this still causes the GedcomLexer.xml file to be copied to the incorrect folder Program Files\Notepad++\plugins\GedcomLexer\Config\GedcomLexer.xml, so that gives the same problem.

    GedcomLexer.zip

    • GedcomLexer.dll
    • Config\GedcomLexer.xml
    • etc. more files

    So my question is, how should I provide the .XML file in the .zip file, in such a way that the Plugins Admin will copy it to the correct .\config\ folder?

    E 1 Reply Last reply Oct 28, 2021, 1:40 PM Reply Quote 1
    • E
      Ekopalypse @Bas de Reuver
      last edited by Oct 28, 2021, 1:40 PM

      @Bas-de-Reuver

      I am not sure if this is the best way.
      From the plugin’s point of view, it is necessary that this file exists.
      What if it was accidentally deleted?

      What I do is check the existence of the file in the setInfo callback and create it if necessary.

      fn set_info(nppData NppData) {
      	npp_data = nppData
      	notepad = npp.Npp{npp_data.npp_handle}
      	editor = sci.create_editors(nppData.scintilla_main_handle, nppData.scintilla_second_handle)
      
      	// create language xml in plugin config directory if needed
      	config_dir := notepad.get_plugin_config_dir()
      	lang_xml := os.join_path(config_dir, language_name+'.xml')
      	if !os.exists(lang_xml) {
      		if !create_lang_xml(lang_xml) {
      			msg := 'Unable to create VLang xml file\n$lang_xml'
      			message_box(npp_data.npp_handle, msg, 'Error', u32(C.MB_OK | C.MB_ICONERROR))
      		}
      	}
      }
      
      1 Reply Last reply Reply Quote 3
      • B
        Bas de Reuver
        last edited by Oct 28, 2021, 2:52 PM

        @Ekopalypse You mean when it’s not found then generate the default XML file on the fly? So the plug-in .DLL will include a hard-coded default XML file including all the default color settings.

        I find it a bit counter-intuitive to include a configuration/settings file as hard-coded, but on the other hand I agree that in this case it is more practical for the end-user. Okay thanks for the tip, I’ll look into that.

        E 1 Reply Last reply Oct 28, 2021, 3:01 PM Reply Quote 1
        • E
          Ekopalypse @Bas de Reuver
          last edited by Oct 28, 2021, 3:01 PM

          @Bas-de-Reuver

          yes, you have to have one anyway.

          1 Reply Last reply Reply Quote 0
          • B
            Bas de Reuver
            last edited by Oct 28, 2021, 11:03 PM

            Okay I’ve fixed the issue, see code here, and I’ll prepare a new release.

            One important thing here is that if you write the lexer xml file, it has to be UTF-8 encoded (so without BOM). If you write it UTF-8-BOM encoded then Notepad++ won’t read it, even though it also won’t give the “xml is missing” error anymore.

            1 Reply Last reply Reply Quote 3
            • D
              datherton15
              last edited by Oct 29, 2021, 7:12 PM

              Apologies if this is in the wrong spot…
              Having issues with the XML Tools plugin crashing when trying to “pretty print” the the xml is missing a single closing bracket on the last tag (it was a bad cut-paste). It consistently happened as I’m poor at cut-paste :oP.
              Thanks for any assistance in passing this forward to the appropriate devs…
              DA

              P 1 Reply Last reply Oct 29, 2021, 10:50 PM Reply Quote 0
              • P
                PeterJones @datherton15
                last edited by Oct 29, 2021, 10:50 PM

                @datherton15 said in Support for Plugins Admin & NppPluginList - Round 2:

                Apologies if this is in the wrong spot…

                It is the wrong spot. This Topic is specifically about the Plugins Admin tool inside Notepad++, not for general questions about any plugin.

                It would be better to ask it as a New Topic in the Plugin Development or Help Wanted sections.

                Thanks for any assistance in passing this forward to the appropriate devs…

                The Plugins > XML Tools > About contains a link to the repository for XML Tools development. From that site, you can go to the “Issues” page, and can create an issue directly with the XML Tools developer.

                D 1 Reply Last reply Nov 14, 2021, 11:04 PM Reply Quote 0
                • B Bas de Reuver referenced this topic on Nov 14, 2021, 12:45 PM
                • B Bas de Reuver referenced this topic on Nov 14, 2021, 12:45 PM
                • D
                  datherton15 @PeterJones
                  last edited by Nov 14, 2021, 11:04 PM

                  @peterjones
                  Thanks and appreciate the directions.
                  Dave

                  1 Reply Last reply Reply Quote 0
                  • L
                    lifehack nerd
                    last edited by Feb 24, 2022, 3:08 PM

                    Hello,

                    I am a new developer for several days. I make my own plug based on the ‘Npp Converter’.
                    But I am confused about the separation lines in the menu.
                    Could anyone tell me how can I remove them? It seems a simple question but I still can’t figure out how to customiz it.

                    Thanks!

                    The separation lines in the red box:
                    1645712633163-img.png

                    this is the code:

                    void commandMenuInit()
                    {
                        //setCommand(1, TEXT("HEX -> ASCII"), hex2Ascii, NULL, false);
                    	//setCommand(2, TEXT("---"), NULL, NULL, false);
                    	//setCommand(CONVERSIONPANEL_INDEX, TEXT("Conversion Panel"), conversionPanel, NULL, false);
                    	//setCommand(4, TEXT("---"), NULL, NULL, false);
                    	//setCommand(5, TEXT("Edit Configuration File"), editConf, NULL, false);
                    	//setCommand(6, TEXT("About"), about, NULL, false);
                    
                    	setCommand(0, TEXT("Filter1"), filterRun1, NULL, false);
                    	setCommand(1, TEXT("Filter2"), filterRun2, NULL, false);
                    	setCommand(2, TEXT("Filter3"), filterRun3, NULL, false);
                    	setCommand(3, TEXT("Edit Configuration"), conversionPanel, NULL, false);
                    	setCommand(4, TEXT("About"), about, NULL, false);
                    }
                    
                    E 1 Reply Last reply Feb 24, 2022, 3:12 PM Reply Quote 0
                    • E
                      Ekopalypse @lifehack nerd
                      last edited by Feb 24, 2022, 3:12 PM

                      @lifehack-nerd

                      Please avoid posting the same question multiple times.

                      L 1 Reply Last reply Feb 24, 2022, 3:17 PM Reply Quote 0
                      • L
                        lifehack nerd @Ekopalypse
                        last edited by Feb 24, 2022, 3:17 PM

                        @ekopalypse Got it. I won’t any more.

                        1 Reply Last reply Reply Quote 0
                        • donhoD donho unpinned this topic on Feb 21, 2024, 4:12 PM
                        • M
                          mh-tp
                          last edited by Mar 15, 2025, 1:37 PM

                          Question: How do I update my local NppPluginList? I find a NppPluginList in C:\Program Files\Notepad++\plugins\Config\nppPluginList.dll
                          version is 1.7.8

                          and the releases on github only offer the source code, but no compiled NppPluginList…

                          Answer: I just downloaded the 8.7.8 installer of Notepad++ and the NppPluginList got updated too. Confusing was the “no update available…” The text and the … is very small, but contains important information about the update releases, so you’ll end up ccleaner or plugins tell you npp isn’t up to date, while it self tells you it is…

                          (I’m not sure if this is the right thread to ask)

                          P 1 Reply Last reply Mar 15, 2025, 2:29 PM Reply Quote 0
                          • P
                            PeterJones @mh-tp
                            last edited by Mar 15, 2025, 2:29 PM

                            @mh-tp said in Support for Plugins Admin & NppPluginList:

                            Answer: I just downloaded the 8.7.8 installer of Notepad++ and the NppPluginList got updated too.

                            Or download the most-recent portable copy, where you can get the DLL without having to upgrade the rest, if you don’t want to.

                            Confusing was the “no update available…”

                            See our “most recent version” FAQ and the User Manual page on Upgrading Notepad++

                            The text and the … is very small, but contains important information about the update releases, so you’ll end up ccleaner or plugins tell you npp isn’t up to date, while it self tells you it is…

                            I don’t see how the size of the text has anything to do with what cleaner tells you (but after years of CCleaner getting worse and worse, I gave up ever listening to what it told me, and uninstalled it ages ago)

                            1 Reply Last reply Reply Quote 0
                            • bombitupB
                              bombitup Banned
                              last edited by Apr 15, 2025, 6:02 AM

                              This post is deleted!
                              1 Reply Last reply Reply Quote 0
                              • bombitupB
                                bombitup Banned @DataCrypt
                                last edited by Apr 15, 2025, 6:26 AM

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                The Community of users of the Notepad++ text editor.
                                Powered by NodeBB | Contributors