From 1faa0fce516c64882141d558f2b1bb7eccc3c890 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 25 Apr 2019 16:04:41 -0700 Subject: [PATCH] Revert "Removing plantuml due to #1448" This reverts commit fac9bdcd7bce2a1284c81aa410ccfa85df13412d. --- containers/plantuml/.devcontainer/Dockerfile | 18 +++++++++++ .../plantuml/.devcontainer/devcontainer.json | 7 ++++ containers/plantuml/.npmignore | 4 +++ containers/plantuml/README.md | 27 ++++++++++++++++ .../plantuml/test-project/markdownsample.md | 32 +++++++++++++++++++ .../plantuml/test-project/sample.plantuml | 26 +++++++++++++++ 6 files changed, 114 insertions(+) create mode 100644 containers/plantuml/.devcontainer/Dockerfile create mode 100644 containers/plantuml/.devcontainer/devcontainer.json create mode 100644 containers/plantuml/.npmignore create mode 100644 containers/plantuml/README.md create mode 100644 containers/plantuml/test-project/markdownsample.md create mode 100644 containers/plantuml/test-project/sample.plantuml diff --git a/containers/plantuml/.devcontainer/Dockerfile b/containers/plantuml/.devcontainer/Dockerfile new file mode 100644 index 0000000000..d93a178034 --- /dev/null +++ b/containers/plantuml/.devcontainer/Dockerfile @@ -0,0 +1,18 @@ +#----------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root for license information. +#----------------------------------------------------------------------------------------- + +FROM openjdk:8 + +# Install git, process tools +RUN apt-get update && apt-get -y install git procps + +# Install GraphViz +RUN apt-get install -y graphviz + +# Clean up +RUN apt-get autoremove -y \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* + diff --git a/containers/plantuml/.devcontainer/devcontainer.json b/containers/plantuml/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..15e5aa6ecf --- /dev/null +++ b/containers/plantuml/.devcontainer/devcontainer.json @@ -0,0 +1,7 @@ +{ + "name": "PlantUML", + "dockerFile": "Dockerfile", + "extensions": [ + "jebbs.plantuml" + ] +} \ No newline at end of file diff --git a/containers/plantuml/.npmignore b/containers/plantuml/.npmignore new file mode 100644 index 0000000000..1d72d293eb --- /dev/null +++ b/containers/plantuml/.npmignore @@ -0,0 +1,4 @@ +README.md +test-project +.vscode +.npmignore diff --git a/containers/plantuml/README.md b/containers/plantuml/README.md new file mode 100644 index 0000000000..e9ddb65d2e --- /dev/null +++ b/containers/plantuml/README.md @@ -0,0 +1,27 @@ +# PlantUML + +## Summary + +*Demonstrates using PlantUML local rendering without installing dependencies. Includes Java, GraphViz, and the PlantUML extension.* + +| Metadata | Value | +|----------|-------| +| *Contributors* | The VS Code Team | +| *Definition type* | Dockerfile | +| *Languages, platforms* | PlantUML | + +## Usage + +[See here for information on using this and other definitions in your project](../../README.md#using-a-definition). There are no addtional steps required. + +### Try it + +1. Run **Remote-Container: Open Folder in Container...** in VS Code and select a cloned copy of this entire folder. +2. The container will build and VS Code will connect. +3. Open `sample.plantuml` in the `test-project` folder and hit Alt-D. + +## License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Licensed under the MIT License. See [LICENSE](../../LICENSE). diff --git a/containers/plantuml/test-project/markdownsample.md b/containers/plantuml/test-project/markdownsample.md new file mode 100644 index 0000000000..4dd1f2e346 --- /dev/null +++ b/containers/plantuml/test-project/markdownsample.md @@ -0,0 +1,32 @@ +# Markdown Sample + +Open the markdown preview to check it out! + +## Code +``` +@startuml +legend + VS Code can do that? +end legend +VisualStudioCode -> Agent: openFolder(path) +Agent -> ExtensionHost: installExtensions +ExtensionHost -> ExtensionHost: download +ExtensionHost -> ExtensionHost: install +ExtensionHost -> Agent: return true +Agent -> VisualStudioCode: return true@enduml +``` + +## Diagram +```plantuml +@startuml +legend + VS Code can do that? +end legend +VisualStudioCode -> Agent: openFolder(path) +Agent -> ExtensionHost: installExtensions +ExtensionHost -> ExtensionHost: download +ExtensionHost -> ExtensionHost: install +ExtensionHost -> Agent: return true +Agent -> VisualStudioCode: return true +@enduml +``` \ No newline at end of file diff --git a/containers/plantuml/test-project/sample.plantuml b/containers/plantuml/test-project/sample.plantuml new file mode 100644 index 0000000000..6e9c835aee --- /dev/null +++ b/containers/plantuml/test-project/sample.plantuml @@ -0,0 +1,26 @@ +# Hit Alt-D preview me! +@startuml +title First Diagram +legend + VS Code can do that? +end legend +VisualStudioCode -> Agent: openFolder(path) +Agent -> ExtensionHost: installExtensions +ExtensionHost -> ExtensionHost: download +ExtensionHost -> ExtensionHost: install +ExtensionHost -> Agent: return true +Agent -> VisualStudioCode: return true +@enduml + +@startuml +title Second Diagram +legend + VS Code can do that? +end legend +VisualStudioCode -> Agent: installWorkspaceExtension(id) +Agent -> ExtensionHost: installExtension(id) +ExtensionHost -> ExtensionHost: download +ExtensionHost -> ExtensionHost: install +ExtensionHost -> Agent: return true +Agent -> VisualStudioCode: return true +@enduml \ No newline at end of file