Community
    • Login

    [New plugin] PlantUML Viewer

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    pluginplantumlnet
    40 Posts 10 Posters 18.4k 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.
    • Fruchtzwerg94F
      Fruchtzwerg94 @Michael Vincent
      last edited by

      @michael-vincent said in [New plugin] PlantUML Viewer:

      Notepad++ shortcut mapper

      Hi @michael-vincent,
      thanks for your proposal. From my understanding setting a shortcut in the plugin can be overridden with the shortcut manager. So you should be free to redefine it like you need it. Is that not the right assumption?

      Michael VincentM PeterJonesP 2 Replies Last reply Reply Quote 0
      • Michael VincentM
        Michael Vincent @Fruchtzwerg94
        last edited by

        @fruchtzwerg94 said in [New plugin] PlantUML Viewer:

        From my understanding setting a shortcut in the plugin can be overridden with the shortcut manager. So you should be free to redefine it

        That is correct. But upon initial install, the user isn’t aware that a shortcut has been set and during normal typing they won’t be able to type the capital letter U - which they may not initially assume has been captured by a plugin. From your write-up above, I was aware this might happen, tested it and when it did, I removed the shortcut manually from Shortcut Mapper.

        I’ve learned it’s better to let the user define their shortcuts for plugins rather than provide them default ones (though some of my plugins still do provide “default” shortcuts).

        Cheers.

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

          @fruchtzwerg94 said in [New plugin] PlantUML Viewer:

          thanks for your proposal. From my understanding setting a shortcut in the plugin can be overridden with the shortcut manager. So you should be free to redefine it like you need it. Is that not the right assumption?

          Plugins, like the applications they are affecting, should be implemented under the principle of least surprise: do not change the user expected experience without making it abundantly clear.

          And there are some changes that should never be made without approval from the user. One such change is you should never override the default behavior of normally typed characters, like a lowercase or uppercase letter. Your plugin having the Shift+U defaulting to your plugin command will break the user experience.

          Moreover, if they don’t happen to type Uppercase U for a few days after installing your plugin, they might think that their keyboard is broken and waste time debugging it or even waste money buying a new keyboard. Or, if they don’t blame it on the keyboard, they might blame it on Notepad++ itself, rather than realizing that it’s your plugin that won’t allow them to type Uppercase U in their HTML file or their C++ source code, which they wouldn’t expect to be affected by your plugin at all.

          To sum up

          1. Plugins should NEVER define shortcuts that are just a letter or shift+letter

          2. Plugin authors should consider not setting any default shortcut for their actions

            • let the user decide to add a shortcut, rather than foisting one upon them.
            • For all you know, the user already has another feature mapped to that shortcut, and they don’t want a hard-to-find conflict that changes the meaning of their favorite shortcut unexpectedly
          3. All shortcuts defined by plugin authors should contain an Alt, a Ctrl, or both.

            • … But don’t ignore #2
          Fruchtzwerg94F 1 Reply Last reply Reply Quote 4
          • Fruchtzwerg94F
            Fruchtzwerg94 @PeterJones
            last edited by

            @peterjones Your points are really good, I am definitively going to change this behaviour. To your point:
            “let the user decide to add a shortcut, rather than foisting one upon them.”
            How would you concretely implement this to Notepad++ ? Hust remove the default shortcut from code and let the user do it completely by its own in the Shortcut Manager of Notepad++. Or also an option in the plugin itself?

            Thanks for your input!

            Alan KilbornA PeterJonesP 3 Replies Last reply Reply Quote 4
            • Alan KilbornA
              Alan Kilborn @Fruchtzwerg94
              last edited by

              @fruchtzwerg94 said in [New plugin] PlantUML Viewer:

              Just remove the default shortcut from code and let the user do it completely by its own in the Shortcut Manager of Notepad++.

              Yes.

              Or also an option in the plugin itself?

              This is also fine.

              @peterjones said in [New plugin] PlantUML Viewer:

              Plugin authors should consider not setting any default shortcut for their actions

              100% agree that plugins should never automatically assign shortcuts, unfortunately so many of them do. :-(

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

                @fruchtzwerg94 said in [New plugin] PlantUML Viewer:

                remove the default shortcut from code and let the user do it completely by its own in the Shortcut Manager of Notepad++. Or also an option in the plugin itself?

                Any command in your plugin’s main menu will be visible by Shortcut Mapper, so you don’t need to do anything special. If you wanted, you could also add the ability to turn on a shortcut in your plugin, but since that interface already exists in Shortcut Mapper, that seems a lot of extra work for you.

                1 Reply Last reply Reply Quote 3
                • Alan KilbornA
                  Alan Kilborn @Fruchtzwerg94
                  last edited by

                  @fruchtzwerg94 said in [New plugin] PlantUML Viewer:

                  Or also an option in the plugin itself?

                  When OP said this, I was thinking of like some sort of first-running “Add this plugin’s keyboard shortcuts to N++?” question, at which point, if the user said yes, the plugin would do it behind the scenes. It could even list out the ones that it would create. (Although, if there are conflicts, what to do…?) Thus it wouldn’t be for the plugin author to recreate a mini-shortcut-mapper in their plugin.

                  Perhaps the only advantage in any of this would be for users that have zero idea the Shortcut Mapper even exists.

                  I stand by that the best advice is to not do anything custom with shortcuts in a plugin, and put those things that benefit from having a keyboard shortcut in the plugin’s main menu (per Peter).

                  Fruchtzwerg94F 1 Reply Last reply Reply Quote 2
                  • Fruchtzwerg94F
                    Fruchtzwerg94 @Alan Kilborn
                    last edited by

                    @alan-kilborn @PeterJones

                    Thanks for these points. These points are great input, sorry for the confusion here. I’ve created a patch and released it already. Therefore I’ve removed the shortcut completely, which is indeed the most straight forward solution.
                    So version 1.1.1.5 should be fine regarding this.
                    Let me know if you see more things which could be improved!

                    Cheers

                    1 Reply Last reply Reply Quote 3
                    • Fruchtzwerg94F
                      Fruchtzwerg94
                      last edited by

                      Update:

                      Since I’ve got some very positive feedback and requests, I’ve created a new release of the plugin. It is now possible to export SVG files as well. Also the usability was improved by adding a context menu. Some small fixes are also included.

                      You can find the latest release here: PlantUmlViewer 1.2.0.6

                      Feel free to contact me for feedback, issues or requests.

                      Cheers,
                      Philipp

                      1 Reply Last reply Reply Quote 3
                      • Fruchtzwerg94F
                        Fruchtzwerg94
                        last edited by Fruchtzwerg94

                        Again, there was a lot of positive feedback and requests. I’ve improved the plugin again by some features. The latest release (1.3.0.7) is now available with some intresting changes like:

                        • Enabled generation of formulas
                        • Added support for multiple diagrams per document
                        • Fixed using the text of the selected document in split mode
                        • A lot of UI improvements (like icons, new buttons, …)

                        ec75eacf-88c5-4651-9afd-312c809beb75-image.png

                        Feel free to get in touch in case of feedback (or other things)!

                        007ramukakaji0 sendhilvS 2 Replies Last reply Reply Quote 3
                        • 007ramukakaji0
                          007ramukakaji @Fruchtzwerg94
                          last edited by

                          @Fruchtzwerg94
                          Not able to install the plugin . I get this error
                          Notepad++ version 8.4.4

                          96e451b3-c34d-4086-b975-88743289316b-image.png

                          Alan KilbornA Fruchtzwerg94F 2 Replies Last reply Reply Quote 0
                          • Fruchtzwerg94F
                            Fruchtzwerg94 @007ramukakaji
                            last edited by

                            @007ramukakaji Hi @007ramukakaji , looks like you are trying to install the x64 version of the plugin on a x86 version of Notepad++. This does indeed not work.
                            Try to install the x84 version of the plugin instead:
                            https://github.com/Fruchtzwerg94/PlantUmlViewer/releases/download/1.3.0.7/PlantUmlViewer_v1.3.0.7_x86.zip

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

                              @007ramukakaji

                              I would assume that you have a 32-bit Notepad++ (from placement in x86) and you are trying to load a 64-bit plugin.

                              Programs and their DLLs (a plugin is a DLL) must match in bitness.

                              1 Reply Last reply Reply Quote 0
                              • sendhilvS
                                sendhilv @Fruchtzwerg94
                                last edited by

                                @Fruchtzwerg94 Splitting a sequence diagram using newpage does not work, only the first page is visible and exportable.
                                I dont see any page navigation option in the context menu.
                                I have version 1.3.0.7

                                Fruchtzwerg94F 2 Replies Last reply Reply Quote 0
                                • Fruchtzwerg94F
                                  Fruchtzwerg94 @sendhilv
                                  last edited by

                                  Good catch @sendhilv . For me it looks like an issue with PlanUML itself. Therefore I’ve created this issue. Let’s see what the developers of PlantUML say about it.

                                  1 Reply Last reply Reply Quote 1
                                  • Fruchtzwerg94F
                                    Fruchtzwerg94 @sendhilv
                                    last edited by Fruchtzwerg94

                                    Hi @sendhilv ,

                                    after some more investigation it seems like I can already come up with a first solution here. I’ve updated the current implementation to support pages as well. It’s not tested deeply but it’s worth a try. With the latest change you are able to navigate pages like shown here:
                                    7e6f1bbd-f37a-4317-a795-9dba5bbd6e72-image.png
                                    It’s not yet released officially so you need download the version to test here:
                                    Added support for multiple pages per document Continuous Integration #63

                                    Would be great if you could do some deeper tests. Please have a look at it and give me some feedback / let me know if it works for you.

                                    BR

                                    1 Reply Last reply Reply Quote 0
                                    • Fruchtzwerg94F
                                      Fruchtzwerg94
                                      last edited by Fruchtzwerg94

                                      Hi all,

                                      with the latest changes, the plugin version 1.4.0.8 is now officially available.
                                      Biggest change is the multi page support:
                                      d12207a8-878b-4981-a6a8-dd6eac721fbc-grafik.png
                                      Also, PlantUML was updated to 1.2022.8, an error message for non UTF-8 documents was added, the file name of generated diagram is shown in the status bar and the plugin colors are automatically updated if Notepad++ colors are changed.

                                      Have fun with it and let me know if there are questions, problems or feedback.

                                      Cheers,
                                      Philipp

                                      1 Reply Last reply Reply Quote 2
                                      • Fruchtzwerg94F
                                        Fruchtzwerg94
                                        last edited by

                                        Since today, the plugins next version is available. It includes some major changes and improvements like:

                                        • PlantUML version 1.2023.0
                                        • Fluent and dark style icons
                                        • Updated to common zoom and scroll behaviour Ctrl + mouse wheel to zoom and (Shift +) mouse wheel to scroll vertically and horizontally
                                        • New include option
                                        • Diagram text can be included to exported SVG images
                                        • Disabled buttons are grayed out
                                        • … and many more

                                        Feel free to get in touch if you have some feedback.

                                        1 Reply Last reply Reply Quote 3
                                        • Fruchtzwerg94F
                                          Fruchtzwerg94
                                          last edited by

                                          A new version 1.6.0.10 is now available. It includes some interesting changes like

                                          • PlantUML version updated to 1.2023.10
                                          • Added option to open the file after export
                                          • Added tooltip with potential generation error message to bottom status
                                          • Ignored non expected generation content due to Java accessibility hooks output like PowerAutomate
                                          • Fixed Notepad++ may freezes if plugin is docked out and looses focus
                                          • Fixed potential generation errors after a generation failed due to Plant UML executable issues

                                          Download it at https://github.com/Fruchtzwerg94/PlantUmlViewer, it should be also available via the plugin manager soon.

                                          1 Reply Last reply Reply Quote 2
                                          • Andy LappingA
                                            Andy Lapping
                                            last edited by

                                            Hi - I tried this on a SysML V2 file and got this: Failed to render.jpg

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