-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plantuml !include "cannot include file" #813
Comments
I had a brief look and my hypothesis is the following: There are relative includes within the plantuml diagrams. When opening them in the plantuml plugin for IntelliJ they work fine. When they are rendered in AsciiDoc, the relative include paths in plantuml are interpreted from the document folder, not the include folder. I'm not yet sure when the images in the preview render; maybe the plantuml plugin creates the image in a temporary folder. I'll need to do some more research here... |
I had another look: PlantUML will resolve the includes relative to the current file. When using includes like To make this work both in the IDE and the command line, I recommend the following:
As this setting is using a system environment variable I am hesitant to add it to the AsciiDoc plugin. Most likely it will interfere with rendering PlantUML diagrams, as setting this in the AsciiDoc plugin will affect all plugins running in the same JVM. Please let me know if this answer is helpful and if this issue an be closed. |
This question has been inactive for some days, therefore I close it. If the issue persists, comment here and I'll re-open the issue. |
I read up about Include file resolution in Asciidoctor. The path resolution of a relative include is described as relative to the including (i.e. current) file. What if we could manage to change the working directory to the plantuml file when an include for such a file is done? I just borrowed the working directory concept - it might work differently.
So, when passing rendering to Plantuml the "working" directoy could be changed to |
Observed vs. expected behavior
Scenario
!include
to further puml files.Behaviour
The behaviour is similar to Issue 175: plantuml !include not working but with different error message.
Steps to reproduce
Environment
Plugin Version: 0.33.6
IntelliJ Details:
IntelliJ IDEA 2021.1.3 (Ultimate Edition)
Build #IU-211.7628.21, built on June 29, 2021
...
Runtime version: 11.0.11+9-b1341.60 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 12
Non-Bundled Plugins: org.intellij.plugins.hcl (0.7.10), org.jetbrains.kotlin (211-1.5.21-release-317-IJ7442.40), PlantUML integration (5.5.1), Pythonid (211.7628.24), org.asciidoctor.intellij.asciidoc (0.33.6)
Kotlin: 211-1.5.21-release-317-IJ7442.40
asciidoctor-intellij-puml-include-v2.zip
The text was updated successfully, but these errors were encountered: