• Login
Community
  • Login

New built-in Plugin Admin (Plugin Manager) is ready

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
117 Posts 22 Posters 94.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.
  • D
    donho
    last edited by donho Nov 3, 2018, 4:48 PM Nov 3, 2018, 4:47 PM

    @dail
    All passed.
    Will you pass me the 64-bits ones so I’ll include them in the nppPluginList for the next release ?

    D 1 Reply Last reply Nov 3, 2018, 4:54 PM Reply Quote 0
    • D
      dail @donho
      last edited by Nov 3, 2018, 4:54 PM

      @donho

      64 bit plugin entries:

      {
      	"folder-name": "BetterMultiSelection",
      	"display-name": "BetterMultiSelection",
      	"version": "1.3",
      	"id": "515db8992abbd434da7f05192300283834e7d3ffb49068ab9db018aaf8ec00f0",
      	"repository": "https://github.com/dail8859/BetterMultiSelection/releases/download/v1.3/BetterMultiSelection_v1.3_x64.zip",
      	"description": "Provides better cursor movements when using multiple selections.",
      	"author": "Justin Dailey",
      	"homepage": "https://github.com/dail8859/BetterMultiSelection"
      },
      {
      	"folder-name": "DoxyIt",
      	"display-name": "DoxyIt",
      	"version": "0.4.3",
      	"id": "93802623dfd1e3db2cab6148f3158d6b3ca98a2f9556cc57bdc4228347acb62d",
      	"repository": "https://github.com/dail8859/DoxyIt/releases/download/v0.4.3/DoxyIt_64.zip",
      	"description": "Support for creating Doxygen comments.",
      	"author": "Justin Dailey",
      	"homepage": "https://github.com/dail8859/DoxyIt"
      },
      {
      	"folder-name": "ElasticTabstops",
      	"display-name": "ElasticTabstops",
      	"version": "1.3",
      	"id": "8cbb183c1fa059480739ce4be9b46b2c07ecf3360e5b1bfc373bee0cfde94d1d",
      	"repository": "https://github.com/dail8859/ElasticTabstops/releases/download/v1.3/ElasticTabstops_64.zip",
      	"description": "Support for Elastic Tabstops.",
      	"author": "Justin Dailey",
      	"homepage": "https://github.com/dail8859/ElasticTabstops"
      },
      {
      	"folder-name": "LuaScript",
      	"display-name": "LuaScript",
      	"version": "0.8",
      	"id": "15e355c7f299059d743950a6d53fe24cc7035ea3221736cb3d4d8a13ae6300f6",
      	"repository": "https://github.com/dail8859/LuaScript/releases/download/v0.8/LuaScript_v0.8_x64.zip",
      	"description": "Adds Lua scripting capabilities. This provides control over all of Scintilla's features and options with a light-weight, fully-functional programming language.",
      	"author": "Justin Dailey",
      	"homepage": "https://github.com/dail8859/LuaScript"
      },
      {
      	"folder-name": "SurroundSelection",
      	"display-name": "SurroundSelection",
      	"version": "1.1",
      	"id": "f6e02a1f4872995ba84e37a4c667598c970aa2ea46307a7b983c663f2ee46c8c",
      	"repository": "https://github.com/dail8859/SurroundSelection/releases/download/v1.1/SurroundSelection_64.zip",
      	"description": "Automatically surround the selection in quotes/brackets/parenthesis/etc.",
      	"author": "Justin Dailey",
      	"homepage": "https://github.com/dail8859/SurroundSelection"
      }
      
      D 1 Reply Last reply Nov 3, 2018, 6:10 PM Reply Quote 0
      • D
        donho @Scott Sumner
        last edited by Nov 3, 2018, 5:15 PM

        @Scott-Sumner

        And to think, all this pain was wrought by one little ad in the corner of a window…

        No Ads in the application even it’s a tiny one - it’s my taste, sorry if you’re offended by it. :)

        During the implementation of PA, not only the project itself is interesting, but also the plugin folder structure has been reviewed and modified to make it better and cleaner. Not mention to it’ll bring the new features in Notepad++ in the future (SHA-256) and in GUP project as well.
        You’re right that It’s painful, but the final product with iteration (thanks to the help of community) is not so bad.

        I could just remove Plugin Manager and ignore the request of community, but I didn’t and I’m quite happy to make implementation of PA done finally.

        1 Reply Last reply Reply Quote 3
        • D
          donho @dail
          last edited by Nov 3, 2018, 6:10 PM

          @dail said:

          64 bit plugin entries:
          All the 64-bits packages don’t work.

          Quick check in the SurroundSelection, found out the reason:
          The name of plugin in the package is SurroundSelection_64.dll instead of SurroundSelection.dll.
          I guess it’s the case for all other packages.

          Please fix the packages then I’ll test it again.

          D 1 Reply Last reply Nov 3, 2018, 7:45 PM Reply Quote 0
          • D
            dinkumoil
            last edited by Nov 3, 2018, 7:35 PM

            @donho said:

            Could you define the API you need by

            Back from garden work and too tired to do anything. Will do it tomorrow.

            1 Reply Last reply Reply Quote 1
            • D
              dail @donho
              last edited by Nov 3, 2018, 7:45 PM

              @donho said:

              Quick check in the SurroundSelection, found out the reason:
              The name of plugin in the package is SurroundSelection_64.dll instead of SurroundSelection.dll.

              Ah yes you are right. Unfortunately I don’t know when I’ll have time to repackage/release them with the correct naming convention.

              1 Reply Last reply Reply Quote 0
              • D
                dinkumoil
                last edited by dinkumoil Nov 4, 2018, 2:32 PM Nov 4, 2018, 2:30 PM

                @donho

                Query full plugin DLL file path by message sent to Npp

                As far as I know Npp is not able to know which plugin has sent a message to it. Thus the plugin has to send:

                • its HMODULE (or some other unique ID known by Npp)
                • a pointer to a buffer receiving the plugin DLL path
                • the length of this buffer.

                These are three parameters, that means it is one too much. In the following my proposal.

                An additional struct type has to be introduced which can hold the buffer pointer and its length. The DLL HMODULE should be send as WPARAM and a pointer to the aforementioned struct as LPARAM.

                #define NPPM_GETPLUGINDLLFILEPATH (NPPMSG + 97)
                // BOOL NPPM_GETPLUGINDLLFILEPATH(HMODULE hDllModuleHandle, bufferDesc *buffer)
                // Get full plugin DLL file path.
                // If the function succeeds the return value is TRUE and the variable bufLen
                // points to contains the number of TCHARs which have been copied to the buffer
                // (not including the terminating 0-TCHAR).
                // If the buffersize is too small the function fails. The return value is FALSE
                // and the variable bufLen points to contains the number of TCHARs needed to hold
                // the full plugin DLL file path (not including the terminating 0-TCHAR).
                // If the function fails for another reason the return value is FALSE and the
                // variable bufLen points to is set to 0.
                //
                // hDllModuleHandle can be obtained in DllMain when it is called with DLL_PROCESS_ATTACH.
                // It is possible to call the function with bufDllPath set to NULL and the variable
                // bufLen points to set to 0 to obtain the needed buffer size.
                
                        struct bufferDesc {
                          TCHAR *bufDllPath;
                          DWORD *bufLen;
                        };
                

                If you have any idea for another way to identify the calling plugin DLL feel free to change the API and its definition.

                1 Reply Last reply Reply Quote 0
                • D
                  dinkumoil
                  last edited by dinkumoil Nov 4, 2018, 2:55 PM Nov 4, 2018, 2:52 PM

                  @donho

                  When digging in PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h I became aware that there is a problem with NPPM_GETPLUGINSCONFIGDIR. Its API documentation is very rudimentary. It is not clear if the function can handle paths longer than MAX_PATH (I guess not) and how it handles buffers with insufficient size.

                  Wouldn’t it be good to review the code of this function and possibly change its implementation in a way that it can handle paths longer than MAX_PATH and that it is possible to query the needed file path buffer size? Before you ask me: I’m not able to do that because I’m not a C++ dev.

                  1 Reply Last reply Reply Quote 0
                  • D
                    dinkumoil
                    last edited by Nov 4, 2018, 3:21 PM

                    @donho
                    I’ve seen that you already changed plugin loading behaviour for the next Npp release (commits 7e555b6 , e9a489c and 1132125 ).

                    I think it would be a good idea if the installer of the upcoming version would warn users that they can not use all old-style plugins anymore if they continue installation. Otherwise I’m afraid that a lot of angry users will flood the support forum with complains á la “New Npp version is destroying my workflows and productivity!”.

                    1 Reply Last reply Reply Quote 1
                    • D
                      dail
                      last edited by Nov 4, 2018, 8:45 PM

                      @donho

                      I came up with an easier way than re-releasing etc all my plugins for 64 bit…here is the entries for the 64 bit list I would appreciate if you could test to make sure they work since I’m currently unable to test it. Thanks.

                      	{
                      		"folder-name": "BetterMultiSelection",
                      		"display-name": "BetterMultiSelection",
                      		"version": "1.3",
                      		"id": "e030a73278798df62c9f956f493e2baff1bb1ac8816c6a42e53a12c178ba56bc",
                      		"repository": "https://github.com/dail8859/BetterMultiSelection/releases/download/v1.3/BetterMultiSelection_v1.3_x64_PA.zip",
                      		"description": "Provides better cursor movements when using multiple selections.",
                      		"author": "Justin Dailey",
                      		"homepage": "https://github.com/dail8859/BetterMultiSelection"
                      	},
                      	{
                      		"folder-name": "DoxyIt",
                      		"display-name": "DoxyIt",
                      		"version": "0.4.3",
                      		"id": "8b63b3905b595795f263ed81340cf42bfcb0a42e8dabac78872c1bd72cdf59e8",
                      		"repository": "https://github.com/dail8859/DoxyIt/releases/download/v0.4.3/DoxyIt_64_PA.zip",
                      		"description": "Support for creating Doxygen comments.",
                      		"author": "Justin Dailey",
                      		"homepage": "https://github.com/dail8859/DoxyIt"
                      	},
                      	{
                      		"folder-name": "ElasticTabstops",
                      		"display-name": "ElasticTabstops",
                      		"version": "1.3",
                      		"id": "c5c9642b0c1b0bb8e59b1922346c3c4f434b29594b2630818eb7b288771e007b",
                      		"repository": "https://github.com/dail8859/ElasticTabstops/releases/download/v1.3/ElasticTabstops_64_PA.zip",
                      		"description": "Support for Elastic Tabstops.",
                      		"author": "Justin Dailey",
                      		"homepage": "https://github.com/dail8859/ElasticTabstops"
                      	},
                      	{
                      		"folder-name": "LuaScript",
                      		"display-name": "LuaScript",
                      		"version": "0.8",
                      		"id": "96d4eeafe46fa93434b7e4e70140691048c24cb5e40acba93aa1e10a57b19e7e",
                      		"repository": "https://github.com/dail8859/LuaScript/releases/download/v0.8/LuaScript_v0.8_x64_PA.zip",
                      		"description": "Adds Lua scripting capabilities. This provides control over all of Scintilla's features and options with a light-weight, fully-functional programming language.",
                      		"author": "Justin Dailey",
                      		"homepage": "https://github.com/dail8859/LuaScript"
                      	},
                      	{
                      		"folder-name": "SurroundSelection",
                      		"display-name": "SurroundSelection",
                      		"version": "1.1",
                      		"id": "f31a113cf30fdb286fd4d2dc40d2bfe4e66d0c0567dc5384d84e06635aeb8423",
                      		"repository": "https://github.com/dail8859/SurroundSelection/releases/download/v1.1/SurroundSelection_64_PA.zip",
                      		"description": "Automatically surround the selection in quotes/brackets/parenthesis/etc.",
                      		"author": "Justin Dailey",
                      		"homepage": "https://github.com/dail8859/SurroundSelection"
                      	}
                      
                      D 1 Reply Last reply Nov 5, 2018, 12:08 AM Reply Quote 0
                      • D
                        donho @dail
                        last edited by Nov 5, 2018, 12:08 AM

                        @dail
                        64-bit plugins passed. commited and merged.

                        D 1 Reply Last reply Nov 5, 2018, 12:27 AM Reply Quote 1
                        • D
                          dail @donho
                          last edited by Nov 5, 2018, 12:27 AM

                          @donho said:

                          64-bit plugins passed. commited and merged.

                          Thanks! Much appreciated.

                          1 Reply Last reply Reply Quote 1
                          • D
                            donho
                            last edited by Nov 7, 2018, 12:14 AM

                            @dinkumoil said:

                            Query full plugin DLL file path by message sent to Npp

                            How about “Query full plugins home path by message sent to Npp” ?
                            Since there is only one location of plugin from 7.6 version, the plugins home path\pluginUniqueName\pluginUniqueName.dll is full plugin DLL file path.

                            1 Reply Last reply Reply Quote 2
                            • D
                              dinkumoil
                              last edited by Nov 7, 2018, 12:40 AM

                              @donho said:

                              How about “Query full plugins home path by message sent to Npp” ?

                              Would be good too and would reduce the parameters to 2 (pointer to buffer and pointer to buffer length), thus no additional struct neccessary. Would be great if you would implement it this way.

                              1 Reply Last reply Reply Quote 2
                              • D
                                donho
                                last edited by Nov 7, 2018, 1:21 AM

                                @dinkumoil Then it will be:

                                #define NPPM_GETPLUGINHOMEPATH (NPPMSG + 97)
                                // BOOL NPPM_GETPLUGINHOMEPATH (size_t strLen, TCHAR *str)
                                // Get plugin home root path.
                                // where str is the allocated TCHAR array by user,
                                //  strLen is the allocated array size by user
                                // The return value is TRUE when get generic_string operation success
                                // Otherwise (allocated array size is too small) FALSE
                                

                                What do you think ?

                                1 Reply Last reply Reply Quote 1
                                • D
                                  dinkumoil
                                  last edited by dinkumoil Nov 7, 2018, 8:28 AM Nov 7, 2018, 8:27 AM

                                  @donho

                                  Better would be:

                                  #define NPPM_GETPLUGINHOMEPATH (NPPMSG + 97)
                                  // INT NPPM_GETPLUGINHOMEPATH(size_t strLen, TCHAR *pluginRootPath)
                                  // Get plugin home root path.
                                  // Returns the number of TCHAR copied/to copy.
                                  // Users should call it with pluginRootPath be NULL to get the required
                                  // number of TCHAR (not including the terminating nul character), allocate
                                  // pluginRootPath buffer with the return value + 1, then call it again to
                                  // get the path.
                                  
                                  D 1 Reply Last reply Nov 8, 2018, 1:49 AM Reply Quote 2
                                  • D
                                    donho @dinkumoil
                                    last edited by Nov 8, 2018, 1:49 AM

                                    @dinkumoil

                                    Done:
                                    https://notepad-plus-plus.org/pluginListTestTools/

                                    1 Reply Last reply Reply Quote 5
                                    • D
                                      dinkumoil
                                      last edited by Nov 8, 2018, 8:20 AM

                                      @donho

                                      Thank you, much appreciated!

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        chcg
                                        last edited by Nov 8, 2018, 8:09 PM

                                        @donho What do you think about plugin entries regarding we know the plugin, but it could currently not be automatically installed and the user need to do it manually. And later one a hint for installed plugins not known to the PA so the user can report them at https://github.com/notepad-plus-plus/nppPluginList .

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          SinghRajenM moderator
                                          last edited by Nov 9, 2018, 7:06 PM

                                          @donho,
                                          I have a quick question here.
                                          What if there are more that two users on a PC. Only one Admin user and rest are standard users. How PA will work?

                                          Consider a case:
                                          Admin installed Npp, so will standard or any other user be able to access PA? I feel ‘nppPluginList.dll’ should go to %allusersprofile% instead of %appdata% or can it be kept in %programfiles% itself?

                                          1 Reply Last reply Reply Quote 2
                                          76 out of 117
                                          • First post
                                            76/117
                                            Last post
                                          The Community of users of the Notepad++ text editor.
                                          Powered by NodeBB | Contributors