Giter Site home page Giter Site logo

vscode-plantuml's Introduction

PlantUML README

Rich PlantUML support for Visual Studio Code.

Build Status

Notice

The server render is now very recommended by this extension, since it's much faster and much easier to setup, while the major weakness has been improved:

  • Enables POST method, you can now render very-large diagrams
  • The extension comes with a new include processor, you won't encounter include problems again.

To make sure you can benifit from this update, make sure your plantuml server enables POST support.

If not, like the official https://www.plantuml.com/plantuml, the extension falls back to use GET, and you may still encounter 414 URI Too Long errors. Setup your own server is recommended.

See also: About Render

Features

  • Preview Diagram, Press Alt + D to start PlantUML preview (option + D on MacOS).
    • Auto update.
    • Zoom & scroll support.
    • Multi-Page Diagram support.
    • Instant preview, if diagram's been exported.
    • From local or server.
    • Snap to Border
  • Export Diagrams
    • At cursor, in current file, in whole workspace, in workspace selected.
    • Concurrent export.
    • Generate URLs.
    • Multi-Page Diagram support.
    • From local or server.
    • Image map (cmapx) support.
  • Editing Supports
    • Format PlantUML code. (Deprecated)
    • All type syntax highlight.
    • All type snippets.
    • Basic auto completion & macro signature support
    • Symbol List support.
  • Others
    • Multi-root Workspace Support.
    • MarkDown integrating support. View Demo
    • Extracting source from images support.

Notice: If you use customize plantuml.jar, please update to the latest version to enable Multi-Page Diagram support. (Later than V1.2017.15)

Format PlantUML code is Deprecated. Don't depend on it, use it only when it works right. I had force disable it in auto-format cases (format on save).

Supported Formats

*.wsd, *.pu, *.puml, *.plantuml, *.iuml

How to install

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install plantuml

Requirements

Depend on which render you choose, plugin has diffrerent requirements.

Requirements for PlantUMLServer render

A plantuml server. See Use PlantUML Server as render.

Requirements for Local render

It's necessary to have following installed:

  • Java : Platform for PlantUML running.
  • Graphviz : PlantUML requires it to calculate positions in diagram.

Quick Install for Mac

brew install --cask temurin
brew install graphviz

Quick Install for Windows

The plugin has an integrated copy of plantuml.jar and GraphViz, so you are normally good to go. But if you want to use your own jar or a different version of GraphViz (maybe a newer version, or with many dependent jars):

  • download the latest plantuml.jar or install it using chocolatey (see below).
  • specify the jar location with the extension setting plantuml.jar.
  • specify the GraphViz installation by defining the Windows environment variable GRAPHVIZ_DOT, e.g., c:\program files\graphviz\bin\dot.exe if you installed plantuml with chocolatey, which automatically installs the latest GraphViz as a dependency.
Choco install

For windows users, majkinetor introduced a way to install plantuml and its dependencies easily. Run cmd.exe as Administrator, and run two commands as follows (the first command is not needed and will fail if you already have chocolatey installed).

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

choco install plantuml

If you've installed java, but still prompts "java not installed", please add java bin path to PATH environment variable.

Typical Files Organization

  • Default extension settings works for independent Plantuml projects.
  • If Plantuml files are only part of your project (as documetation), use plantuml.diagramsRoot and plantuml.exportOutDir to setting up the organization, for example:
"plantuml.diagramsRoot": "docs/diagrams/src",
"plantuml.exportOutDir": "docs/diagrams/out"

You'll get export results like:

Project Folder/
  docs/
    diagrams/
      src/
        architecture_overview.wsd
      out/
        architecture_overview/
          architecture_overview.png
  ...rest_of_your_project_folders/
  ...rest_of_your_project_files 

Include Files Search Logic

Latest version has changed the include files search logic once again. It is possible to configure includepaths now in settings.json.

The new search order is as follows:

  1. The folder of the rendered file
  2. The includepaths as configured in settings.json
"plantuml.includepaths": ["docs/diagrams/style","docs/diagrams/src"],
  1. The diagramsRoot

The setting includeSearch is not needed anymore, since the folder of the plantuml file and the diagramsRoot are always both in the include path.

To new projects, it's recommended not to rely on diagramsRoot and configure all required includepaths explicitly.

Thanks anotherandi for the brilliant idea and implementation!

Preview Demos

Preview page provides various zoom/pan actions and snap feature:

  • Zoom operations (since version 2.7.0):
    • Zoom to select area
    • Pinch to zoom (TouchPad)
    • Click to zoom in, alt + click to zoom out
    • Ctrl + mouse scroll to zoom in/out
    • Middle mouse button click to toggle zoom
    • Zoom in / zoom out / toggle buttons of the controls bar.
  • Pan operations (since version 2.7.0):
    • Right mouse button drag
    • Two-finger move to pan (TouchPad)
    • Mouse scroll
  • Snap to border (since v2.8.0):
    • Scroll to most bottom/right/top/left, preview will snap to that border.

    e.g. Snap to Bottom is useful while writing long activity diagrams, which helps you keep focus in the latest part in the bottom.

Auto update:

audo update demo

zoom & scroll:

zoom demo

Multi-Page View:

Multi-Page demo

Export Demos

Export diagram:

export demo

Generate URLs

url demo

Extract Diagram Source

extract demo

About Format

format demo

PlantUML formatter is disabled (since v2.8.3) if editor.formatOnSave is on. Because the formatter is not reliable enough according to user feedbacks.

About Snippets

snippet demo

This plugin integrates all type diagram snippets. They are splitted into 9 sections:

  • diagram: snippets for general diagrams elements.
  • activity: snippets for activity diagrams.
  • class: snippets for class diagrams.
  • component: snippets for component diagrams.
  • state: snippets for state diagrams.
  • usecase: snippets for usecase diagrams.
  • sequence: snippets for sequence diagrams.
  • ui: snippets for salt diagrams.
  • egg: snippets for some funny diagrams, like sudoku, earth.

For exsample, type acife (short version) to trigge following snippet (activity➤if・else):

if (cond1?) then (val1)

else (val2)

endif

About Symbol List (List diagrams of file)

list_symbol_demo.png

Press Ctrl+Shift+O to list all diagrams in the file. You can name the diagram when diagram starts.

@startuml diagram name sudoku @enduml

About Render

Plugin supports two renders: Local and PlantUMLServer.

Local is the default and traditional way. If you care more about export speed, you should try PlantUMLServer.

Local: 6 documents, 9 digrams, 14 files exported in 24.149 seconds
PlantUMLServer: 6 documents, 9 digrams, 14 files exported in 1.564 seconds

Advantages and Disadvantages of PlantUMLServer Render

Advantages:

  • 15X times faster export and much quicker preview response.
  • Don't have to set local enviroments if you have a server in your team.
  • You don't need plantuml.exportConcurrency, because it's unlimited in concurrency.

Disadvantages:

  • Cannot render very-large diagrams (414 URI Too Long).
  • Cannot render diagrams with !include in it.
  • Less format support: png, svg, txt.
  • Some settings are not applicable: plantuml.jar, plantuml.commandArgs, plantuml.jarArgs.

Use PlantUML Server as Render

To render very-large diagrams with include support, please make sure your plantuml server enables POST support.

If not, like the official https://www.plantuml.com/plantuml, the extension falls back to use GET, and you may still encounter 414 URI Too Long errors.

Setup your own server is recommended.

  • You may already have a PlantUML server in your team, find the server address, like: http://192.168.1.100:8080.

  • If don't have one, set up following the instructions, run with Docker is recommended. Find the server address, like: http://localhost:8080, or http://192.168.1.100:8080 which is ready for sharing to your team.

  • Another option for running a PlantUML server on your local machine is to use the built in picowebserver, which can be as simple as running java -jar plantuml.jar -picoweb, read more here: https://plantuml.com/picoweb

  • Open user setting, and configure like:

"plantuml.server": "http://192.168.1.100:8080",
"plantuml.render": "PlantUMLServer",

Multiple languages support

Translations are welcome. lang.nls.json, package.nls.json

languages demo

MarkDown integrating

markdown demo

@startuml / @enduml is still recommended, so that PlantUML code in Markdown can be managed by other function of this plugin.

Extension Settings

This extension contributes the following settings.

Render Select:

  • plantuml.render: Select diagram render for both export and preview.

PlantUMLServer Render Settings:

  • plantuml.server: PlantUML server to generate UML diagrams on-the-fly.

Local Render Settings:

  • plantuml.java: Java executable location.
  • plantuml.commandArgs: commandArgs allows you add command arguments to java command, such as -DPLANTUML_LIMIT_SIZE=8192.
  • plantuml.jar: Alternate plantuml.jar location. Leave it blank to use integrated jar.
  • plantuml.jarArgs: jarArgs allows you add arguments to plantuml.jar, such as -config plantuml.config.
  • plantuml.includepaths: Specifies the include paths besides source folder and the diagramsRoot.

Export Settings:

  • plantuml.diagramsRoot: Specifies where all diagram files located (relative to workspace folder).
  • plantuml.exportOutDir: Exported workspace diagrams will be organized in this directory (relative path to workspace folder).
  • plantuml.fileExtensions: File extensions that find to export. Especially in workspace settings, you may add your own extensions so as to export diagrams in source code files, like ".java".
  • plantuml.exportFormat: format to export. default is not set, user may pick one format everytime exports. You can still set a format for it if you don't want to pick.
  • plantuml.exportSubFolder: export diagrams to a folder which has same name with host file.
  • plantuml.exportIncludeFolderHeirarchy: include folder heiracrchy between the root and the source diagram in the exported file path.
  • plantuml.exportConcurrency: decides concurrency count when export multiple diagrams.
  • plantuml.exportMapFile: Determine whether export image map (.cmapx) file when export.

Preview Settings:

  • plantuml.previewAutoUpdate: Dedecides if automatically update the preview window.

Other Settings:

  • plantuml.urlFormat: URL format. Leave it blank to pick format everytime you generate a URL.
  • plantuml.urlResult: URL result type. Simple URL or ready for MarkDown use.
  • plantuml.lintDiagramNoName: Decides if it should lint when diagram is unmaned.

Known Issues

Please post and view issues on GitHub

Thanks

Translators

Donators

Thanks for your encouragements!

Claus Appel, 三島木​一磨, 富吉​佑季, 黒田悦成, Jared Birdsall, Suleyman Cabir Ciplak, Malcolm Learner, Сысоев Максим, Gokan Kenichi, anb0s, Lawrence Yarian, Ahmad Ragab, 山田​暁通


Enjoy!

vscode-plantuml's People

Contributors

aangelcc avatar alantsai avatar alonelucky avatar arcticlampyrid avatar cazeaux avatar elad-eyal avatar fuhrmanator avatar haipengno1 avatar hellothisisflo avatar herrphon avatar kannkyo avatar koara-local avatar kristopher-pellizzi avatar metur4ik avatar mikkel-ol avatar moormaster avatar mweb avatar neumantm avatar qjebbs avatar rado0x54 avatar reub-the-cube avatar ricardoniepel avatar sh-cho avatar stfsy avatar svallory avatar the-lum avatar udaken avatar yuhsylphy avatar z77ma avatar zepmanbc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-plantuml's Issues

Impossible to generate PDF

Hello,

when I try to export to PDF, i got error :
java.lang.ClassNotFoundException: org.apache.batik.apps.rasterizer.SVGConverter at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(N ative Method) at java.lang.Class.forName(Unknown Source) at net.sourceforge.plantuml.pdf.PdfConverter.convert(PdfConverter.java:48) at net.sourceforge.plantum

I saw on official website plantUml, that it needs more lib :
Original post
http://plantuml.sourceforge.net/qa/?qa=4334/trying-to-produce-pdf-output-crashes-plantuml

Official Response
http://plantuml.com/pdf

How could I activate it on your plugin ?

Regards
Marco

Preview not working, but executing from cmd yes.

Hello,
The "Preview Current Diagram" is not working. I create a test file like this: "Untitled-1.wsd"

@startuml
 Alice->Bob:test
@enduml

Then I execute the command in Visual Studio Code by pressing Ctrl+Shift+P y choose "PlantUML: Preview Current Diagram". A preview panel in the Side is opening and I can see a progress bar that says "Processing" for a few seconds, then an icon of broken image appear.
But If I open a cmd console and execute:

java -jar C:\Users\XXXXX\.vscode\extensions\jebbs.plantuml-2.1.1\plantuml.jar -verbose Untitled-1.wsd

A png is generate correctly.

I've tried to change the property "plantuml.previewFileType" to "svg", but no luck, same happen.
How can I see what is happen? Any clue?

Thank you.

Zoom in and out the generated diagram

I read the comment, but I think that it would be a great feature as well.

  1. To check whether the diagram is correct without generating it.
  2. I use VS Code as viewer of the diagrams and don't want to generate them, just browse via the editor and generator.

Maybe there is a way? :) Unfortunately, I use VS Code for a few days now and cannot even suggest another extension where something similar works.

Simple export names

More of a feature request or a question than an issue.

I guess the names and directory structure used when doing a simple export is handy for larger projects. In other more simple uses though, for example a single diagram file that is intended to produce a single image, the names and directories are pretty unwieldy.

Is there already some setting, or could ones be added to allow an export to take the name of the wsd file and placed either in the same directory or alternatively directly within the out directory?

For example, suppose I make a test UML class diagram named Bar Class Diagram.wsd like:

@startuml

abstract class BarBase {
    +{abstract}Field:bool
    +{abstract}Method():int
}

class BarDerived {
    +Field:bool
    +Method():int
}

BarBase <|-down- BarDerived

@enduml

And then export to *.png. the exported file would be ./Bar Class Diagram.png (or at the least be ./out/Bar Class Diagram.png. Instead of being the current ./out/Bar Class Diagram/Bar Class [email protected]

Preview breaks when cursor is outside of start/end tags

The preview is broken when the text cursor is outside of the @startuml and @enduml tags in a source file. It says "No valid diagram found here!". I think this is very unintuitive behavior, if not a bug. It is quite common to have a blank line at the end of files, and this means that preview breaks if you happen to be on the last line of the file.

Ubuntu 16.04
VS Code 1.16.0

Code formatting breaks indentation

I'm having trouble with the code formatter. It's quite likely that it's another formatter I have installed within VSCode but I'm not sure how to debug.

I have 'format on save' enabled and upon save, all the indentation in my plantuml file is removed.

If I change the '.plantuml' and '.wdsd' file association to Text via settings.json then the formatting doesn't happen and the preview renders fine.

What's the best way for me to debug this?

Support VsCode color theme in render output

Not sure if it is possible, but it would be great if the extension could potentially use the color theme currently in use to set the background of the PlantUML Preview. When running a dark theme, that sea of white is glaring.

If at all possible, I would be willing to help if pointed in the right direction.

Doesn't support multipage diagrams

Like atom plantuml plugin, supports multipage diagrams.
newpage within @startuml/@enduml
Multiple @startuml/@enduml within file
Combinations of both
Thanks

Support for VS 2015

Hi!

I really like the idea of this extension. However, would it be possible to support also Visual Studio 2015? I am working on a small for fun project with friends and we decided to use PlantUML for our modeling. I would very appreciate to have possibility to edit directly in VS instead of some external tool.

Can this be done? I honestly have no idea how these extensions are made, if there is some compatibility between VS2015 and VSCode or it needs to be completely rewritten.

Display exported path

It would be helpful to see the full path of the exported file(s) on the export complete notification message.

Rendering error

The following code is rendered in standalone plantuml but not within the plugin (syntax error):

@startuml
    object TEST
    object TEST2
    TEST *-right-{ TEST2
@enduml

Regrds,
Z-

Blockdiag support in PlantUML

Hello,
First of all thank for great plugin. It really makes life easier :)

I have a question which maybe is a bit out of scope PlantUML plugin but maybe based on this one it is possible to make a bit more general tool for visualization of different languages similar to PlantUML.

While UML is quite powerful not always it is the best language to describe some kind of diagrams. More logical one block diagrams are not well supported there.

But there is similar language which work on similar base concept it is called blockdiag
Details can be found: http://blockdiag.com/en/blockdiag/index.html

The idea is similar we have text base language which can generate block diagrams.

Question is if it was possible (and not too complicated) to embaded in PlantUML also support for Blockdiag sytax and visualization.

I know that it is a bit out of scope of original idea but to have one common plugin would be very handfull.

Regards
Tomiga

Support Preview Clipboard copy

Great extension, thanks - I use it every day.

Just wondered if it would be possible to support copying the preview image to allow pasting straight into Word?

At the moment I export to a SVG file, preview in the browser, copy, then paste. This gives great quality but would be a lot easier if the copy could be done from within the preview. It would also avoid exporting a lot of files.

Diagram auto update not working

I have the latest version of code and PlantUMl extension loaded. The AutoUpdate of the diagram is not working. I have to keep hitting Alt-D for the diagram to update.

Cannot export Diagrams on macOS

Visual studio code version: 1.8.1

Plugin Version: 1.2.0

Platform: macOS Sierra

Description:

On my machine, all requirements are met:

  • Java : Platform for PlantUML running.
  • Graphviz : PlantUML requires it to calculate positions in diagram.
  • PlantUML : Download and place it in extension root folder.

I can show diagrams on PlantUML Preview. The generate URLs functions (Generate URL for Current Diagram, Generate URLs for Current File Diagrams) can work perfectly. However, I cannot export diagrams (using functions: Export Current Diagram, Export Current File Diagrams, Export Workspace Diagrams). After selecting export function and export file format, nothing happens.

Multiline note syntax not correct

Sample code:

A -> B: Get Foo
note right
    Multiline Notes
    Example Here
endnote
A <- B: Return Foo

I expect A <- B: Return Foo to be highlighted just like A -> B: Get Foo. But Its shown in green (See attached screenshot)
screen shot 2017-04-19 at 12 29 36 pm

Sequence: Several alias syntax is not highlighted

@startuml
    ' OK
    A as "a a a" -> B
    A <- B
    C -> D as "d d d"
    C <- D
    E as "e e e" -> F as "f f f"
    E <- F
    G as "g g g" -> "h h h" as H
    G <- H
    "i i i" as I -> J as "j j j"
    I <- J
@enduml
@startuml
    ' NG
    "a a a" as A -> B
    A <- B
    C -> "d d d" as D
    C <- D
    "e e e" as E -> "f f f" as F
    E <- F
@enduml

image

No syntax highlight for ranged `note over`.

Highlighting stops when i insert a comma after first participant (Bob). Example code:

note over Bob, Alice
	This is yet another
	example of
	a long note.
end note

Screenshot:
plant

About PLANTUML_LIMIT_SIZE.

Hi,

When I had tried to display large diagrams and to export, the image was only partially displayed.
I found that the upper limit of the output size of the image is written in PlantUML FAQ.
http://plantuml.com/faq
But I could not understand how to change it on this plugin.

Could anyone add explanations or functions to deal with it?

Thanks.

Quotes in title are not cleaned from filename on export

When you specify a title with quotes ("), the export "succeeds" with no file being created.

I have not tested with other special path characters, although question mark (?) is filtered correctly.

Operating System: Windows 7 Enterprise

Example

@startuml

title "Some Title"

@enduml

Actual Result

No error, but no file.

image

When using Process Monitor you can see the failure:

10:41:58,3135011    Code.exe    13536   CreateFile              E:\diagrams                     SUCCESS
10:41:58,3135434    Code.exe    13536   QueryAllInformationFile E:\diagrams                     BUFFER OVERFLOW
10:41:58,3135712    Code.exe    13536   QueryInformationVolume  E:\diagrams                     BUFFER OVERFLOW
10:41:58,3135922    Code.exe    13536   CloseFile               E:\diagrams                     SUCCESS
10:41:58,3246091    Code.exe    13536   CreateFile              E:\diagrams\ Some Title".png    NAME INVALID

Expected Result

A file called E:\diagrams\Some Title.png

More detailed install instructions

Hi,

to make more users utilize the solution could you provide a fool prove install instruction.
I already use plantuml frequently in IntelliJ but would love to do so also for c# projects on visual studio (2015).

However I'm running in some probs here.
What is the extension root and where to find it?
Launching VS Code Quick Open (CTRL+P) launches the printer menu...where to find it?
You see, I'm rather new to VS.

Anyway thanks for the plugin ;-)

Feature request: support preview plantuml in markdown

Hi @qjebbs could you please add preview support if writing plantuml in markdown? We're using gitlab with plantuml server to manage design docs, it supports following syntax to put plantuml in markdown file

```plantuml
Bob -> Alice : hello
Alice -> Bob : Go Away
```

for the details, please refer to gitlab doc

nailgun fork

I just wanted to let you know that I published a fork of your project that uses nailgun to improve preview and export speed.

I doubt you would have any interest since it is a pretty extreme change and does remove some configuration options. However, if you are interested I'd be happy to submit a PR or at least collaborate with you on adding a nailgun option here.

Also, if you have any issues with me publishing to the vscode marketplace please let me know. I left all of the original attributions and donation links in place. I'm certainly not trying to take credit for your work -- I just wanted to go in a slightly different direction :-)

malfunctioning when using apostrophe in Activities labels - Activity diagram

hi!
First of all, great plugin. I use it all the time. Thank you.

I like to inform about an small issue when using apostrophes in Activities labels, for Activity diagrams.

if I do not use apostrophes, everything work like a charm. If I include one, it seems everything bellow is treated as text and nothing works correctly in the editor. Even do the diagram it's rendered.

2017-09-06 11_48_05-new activity diagram beta syntax and features

Thank you!
-Alex

Exceptions dring export with color gradients

My style contains some color gradients as background colors. When I try to export it as pdf or latex it throws the following exception.
The export as png does work correctly. Also the pdf/latex export works if I change the color to a solid color.
My example code ist also listed below.

Examplecode:
skinparam class { BackgroundColor #c3d8f4-#6192d1 BorderColor #505050 FontColor #505050 } class Class{ Dummy }

Exception:
java.lang.ClassCastException: net.sourceforge.plantuml.graphic.HtmlColorGradient cannot be cast to net.sourceforge.plantuml.graphic.HtmlColorSimple at net.sourceforge.plantuml.ugraphic.ColorMapperIdentity.getMappedColor(ColorMapperIdentity.java:58) at net.sourceforge.plantuml.ugraphic.ColorMapperTransparentWrapper.getMappedColor(ColorMapperTransparentWrapper.java:61) at net.sourceforge.plantuml.ugraphic.tikz.DriverRectangleTikz.draw(DriverRectangleTikz.java:54) at net.sourceforge.plantuml.ugraphic.tikz.DriverRectangleTikz.draw(DriverRectangleTikz.java:45) at net.sourceforge.plantuml.ugraphic.AbstractUGraphic.draw(AbstractUGraphic.java:89) at net.sourceforge.plantuml.svek.image.EntityImageClass.drawInternal(EntityImageClass.java:159) at net.sourceforge.plantuml.svek.image.EntityImageClass.drawU(EntityImageClass.java:128) at net.sourceforge.plantuml.svek.SvekResult.drawU(SvekResult.java:83) at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageInternal(ImageBuilder.java:248) at net.sourceforge.plantuml.ugraphic.ImageBuilder.writeImageTOBEMOVED(ImageBuilder.java:172) at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFileInternal(CucaDiagramFileMakerSvek.java:124) at net.sourceforge.plantuml.svek.CucaDiagramFileMakerSvek.createFile(CucaDiagramFileMakerSvek.java:70) at net.sourceforge.plantuml.cucadiagram.CucaDiagram.exportDiagramInternal(CucaDiagram.java:339) at net.sourceforge.plantuml.classdiagram.ClassDiagram.exportDiagramInternal(ClassDiagram.java:207) at net.sourceforge.plantuml.UmlDiagram.exportDiagramNow(UmlDiagram.java:236) at net.sourceforge.plantuml.AbstractPSystem.exportDiagram(AbstractPSystem.java:134) at net.sourceforge.plantuml.SourceStringReader.outputImage(SourceStringReader.java:154) at net.sourceforge.plantuml.Pipe.managePipe(Pipe.java:95) at net.sourceforge.plantuml.Run.managePipe(Run.java:285) at net.sourceforge.plantuml.Run.main(Run.java:136)

Chocolatey installation

It would be good to mention chocolatey installation of plantuml as of way to install it

https://chocolatey.org/packages/plantuml

I maintain the package always up to date

You cold even detect chocolaty installation and set it to use its jar by default if present. The location is

$Env:ChocolateyInstall\lib\plantuml\tools\plantuml.jar

The benefit is that choco package installs dependencies, reference guide and keeps it up to date.

Layout breaks when describing the connectors and using boundaries

Layout breaks when previewing/exporting the diagram from the PlanUML documentation:

@startuml
left to right direction
skinparam packageStyle rectangle
actor customer
actor clerk
rectangle checkout {
  customer -- (checkout)
  (checkout) .> (payment) : include
  (help) .> (checkout) : extends
  (checkout) -- clerk
}
@enduml

The result has way too long connectors:
bug 120-131

Rendering from the reference plant UML server looks like this:
reference

It happens only when connector description is used together with rectangle (or any other boundary) notation.

I am running MacOSX with the following software installed:

  • PlantUML VSCode extension v1.2.3
  • GraphViz installed thorugh homebrew v2.40.1
  • PlantUML.jar Version 8056
  • Java version build 1.8.0_65-b17
  • VSCode version 1.9.0

Any help with this issue would be greatly appreciated.

Btw, thanks for the awesome extension. 👍

Inconsistent filenames

There are some magic numbers in my exported diagram filenames, e.g. [email protected]. These numbers seem to change. This means I cannot reference my diagrams via URL. That's obviously bad.

I want to have static filenames without any special stuff at the end.

Diagram error when env variable JAVA_TOOL_OPTIONS is defined

When JAVA_TOOL_OPTIONS environment variable is defined plugins says that there is error in diagram.

Steps to reproduce:

  1. (OS Windows 10)
  2. Define JAVA_TOOL_OPTIONS environment variable
    (mine is JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true)
  3. Try go generate preview for any diagram, ie:
@startuml
class Foo {
}
@enduml
  1. The preview looks like this:

diagram error

Same things happens for diagram exporting.

Steps to reproduce:

  1. Try to export diagram to file.
  2. Following error appear in Output tab:
Error found in diagram test@1-6
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true

After unsetting this variable everything works fine.

Maintain zoom level after autoupdate

First, great extension. Really grateful to you for providing it. I see where we have a new feature to be able to zoom the preview image. I just have one problem with this. Whenever the preview auto updates, the preview image reverts to the fitting its width to the preview pane, which effectively reduces the size (Edit: I have a wide as against a long diagram). I have to zoom again to see my change. Is it possible to add a setting to maintain the current zoom level after update? Or have the option for the image to be displayed at the actually size by default?

Thanks.

Formatting option

Default formatting not working with plant-UML code. Any easy way for it?

Please find a sample

@startuml
title A sample to show format Requirement
start
partition Sample_Partition
:Open “ABCD” downloaded file;
:In Load Sample images;
while (Some available for help?)
:Read the complaint;
if(need a reply”?) then(yes)
:Add reason in File;
else (no)
if(need to be included?) then(yes)
:Add reason in file;
else (no)
if(need to apply label?) then(yes)
:Apply label;
else (no)
:No change needed;
endif
endif
endif
:update pdf with proper stamping;
endwhile
stop
@enduml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.