Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-DIAG-024

The useJar and jarPath settings choose the PlantUML engine

When PlantUML diagrams are drawn, the extension SHALL select the built-in engine unless the setting markdownOkfSchemaStudio.plantuml.useJar is exactly true, and the JAR pipeline, which uses markdownOkfSchemaStudio.plantuml.jarPath, when it is true.

Part of StRS-MDOKFSTUDIO-DIAG-006, outside the paths drawn on its map.

Step 1 of path 1 in StRS-MDOKFSTUDIO-DIAG-007: from “PlantUML diagrams are drawn by the built-in engine” to “The JAR pipeline is selected”.

Scenarios 8

The situations the tests check; open one to read it.

nominalDefault and true
Giventhe setting markdownOkfSchemaStudio.plantuml.useJar unset, then set to true in a trusted workspace
Whena preview is rendered
Thenwhen useJar is not exactly true the extension draws PlantUML diagrams with the built-in engine, and when it is true in a trusted workspace it selects the JAR pipeline
the unset setting selects the built-in engine and true selects the JAR pipeline
refusalValue that is not the boolean true
InputOutcome
useJar holding the text truethe built-in engine is selected and no process is started
useJar holding the number 1the built-in engine is selected and no process is started
boundaryTrust of the workspace
InputOutcome
useJar true in an untrusted workspacethe JAR pipeline is still selected, which refuses to start a process; no diagram is drawn by the built-in engine and the choice never falls back to the built-in engine
useJar false in the same untrusted workspacethe built-in engine draws the diagrams
nominalThe built-in engine starts no process
GivenuseJar off, in a trusted workspace with a jarPath set, and in an untrusted workspace
Whena preview with PlantUML diagrams is rendered
Thenno process is spawned and no PlantUML executable or JAR is read in either trust state
in the trusted workspace the host reports no PlantUML diagram result, and in the untrusted workspace the diagrams are left to the page
nominalThe built-in engine needs nothing outside the extension
InputOutcome
a diagram that selects a theme of the bundled library and uses an OpenIconic iconthe picture is drawn and nothing is fetched
a class diagram on a machine without Graphvizthe picture is drawn with PlantUML's own Smetana layout, with no network access and no Graphviz installation
boundaryjarPath is ignored until useJar is on
InputOutcome
jarPath holding a JAR path and useJar offthe built-in engine draws the diagrams and the JAR is neither checked nor started; the value is kept
the same jarPath after useJar is turned on and the preview is rendered againthe JAR pipeline uses that path without it being entered again
nominalA PlantUML setting change renders the open document again
InputOutcome
a change of plantuml.useJar (or any other markdownOkfSchemaStudio.plantuml setting) with a preview openthe preview settings are read again for every open preview and the document is rendered with the other engine, without reopening the preview
a change of a setting outside the preview, plantuml and frontmatter sectionsnothing is re-read and nothing is rendered again
boundaryThe settings are contributed with an explanation
InputOutcome
the extension manifest, markdownOkfSchemaStudio.plantuml.useJara boolean with default false and order 79, with a Markdown description of the engine choice of at most 700 characters
the extension manifest, markdownOkfSchemaStudio.plantuml.jarPatha string with an empty default and order 80, with a description of at most 700 characters that names useJar, the workspace folder and the PATH command (used only when useJar is on, relative to the workspace folder, empty for the plantuml command)
the orders of the other contributed settingsno other setting has order 79
the categories of the settings registryPlantUML is the fifth category (position 5) and holds useJar and jarPath
the manifest categories compared with the registrytitles and orders are equal

Implemented in 5

Tested by 8

Known limits (5)

Replaces

SwRS-MDOKFSTUDIO-DIAG-025useJar in an untrusted workspace keeps the JAR pipeline superseded superseded by SwRS-MDOKFSTUDIO-DIAG-024 Markdown file
SwRS-MDOKFSTUDIO-DIAG-026The built-in engine starts no process superseded superseded by SwRS-MDOKFSTUDIO-DIAG-024 Markdown file
SwRS-MDOKFSTUDIO-DIAG-027jarPath is ignored until useJar is on superseded superseded by SwRS-MDOKFSTUDIO-DIAG-024 Markdown file
SwRS-MDOKFSTUDIO-DIAG-031The built-in engine needs nothing outside the extension superseded superseded by SwRS-MDOKFSTUDIO-DIAG-024 Markdown file
SwRS-MDOKFSTUDIO-DIAG-075Changing a PlantUML setting renders the open document again superseded superseded by SwRS-MDOKFSTUDIO-DIAG-024 Markdown file
SwRS-MDOKFSTUDIO-DIAG-076The useJar setting is contributed with an explanation superseded superseded by SwRS-MDOKFSTUDIO-DIAG-024 Markdown file
SwRS-MDOKFSTUDIO-DIAG-077The jarPath setting is contributed with an explanation superseded superseded by SwRS-MDOKFSTUDIO-DIAG-024 Markdown file
SwRS-MDOKFSTUDIO-DIAG-078The PlantUML settings form their own category superseded superseded by SwRS-MDOKFSTUDIO-DIAG-024 Markdown file