Fruchtzwerg94 / PlantUmlViewer

A Notepad++ plugin to generate, view and export PlantUML diagrams
MIT License
78 stars 8 forks source link

[FEATURE] PlantUML Processing - Parameter Support #31

Open SieDa opened 3 days ago

SieDa commented 3 days ago

Description Instead of only providing a [Refresh]-Button it would be nice to influence the processing similar to some PlantUML Command Line features.

  1. Run Simple Instructions directly without entering this code.

    @startuml
    instruction
    @enduml

    That can be achieved in the command line by calling:

    java -jar plantuml.jar -instruction

    So open a Pull Down Area that shows further buttons in the Preview Pane: [Author], [Version], [Stdlib]

  2. Run more complex instructions without needing to go to the command line. Add addition Buttons, that use the PlantUML command line to provide [Help], [Language], [Printfonts]

  3. Process the the source code similar to using the commandline

Stepwise you can support -nometadata, -charset, ... all that make sense for a single source file.

With different preview styles you can do this for -teps, -teps:text, -thtml, -tlatex, -tlatex:nopreamble, -tpdf, -tpng, -tscxml, -tsvg, -ttxt, -tutxt, -tvdx, -txmi, ...

Solution On Processing - different to Refresh - the PlantUML Processing ist used to deliver a result into the output area. [View Code] might be an option to provide a button to show the source code of some of those (svg, txt, latex, ...) in notepad, if that makes sense.

Fruchtzwerg94 commented 2 days ago

Hi @SieDa ,

note that PlantUmlViewer aims to be a simple GUI integration to preview diagrams. It shall not be some kind of code or command generator. What exactly is your use case behind this request? What is the reason not just to use the CLI directy for advanced usage like this? I don't see how this could improve the PlantUmlViewer plugin.

BR, Philipp

SieDa commented 2 days ago

Hi Philipp, well done so far.

There are three major reasons in case you only have N++ to edit the code, then

  1. it provides to preview directly the SVG to be readable in any scaling.
  2. it provides to directly produce the same result as if the command line is used, just to avoid switching between n++ edit, shell process and browser preview (or what ever is needed).
  3. it provides faster access to CLI Informations in the "simple GUI".

Does that make sense to you? Best regards SieDa

Fruchtzwerg94 commented 2 days ago

Hi @SieDa ,

I don't see which parameters / arguments you want so set in a specific way and read out here. PlantUML is called straight forward without any specific arguments. The only thing difference to a standard call is using pipes and splitting the diagram pages into several generation steps. This means there are potentially multiple commands to be executed. Maybe nppexec is what you are looking for here? Using the plugin you can call PlantUML directly to generate and open the SVG.

BR, Philipp