jvantuyl / sublime_diagram_plugin Goto Github PK
View Code? Open in Web Editor NEWA Plug-In for Sublime Text 2 / 3 To Render Diagrams In Your Source Code
License: Other
A Plug-In for Sublime Text 2 / 3 To Render Diagrams In Your Source Code
License: Other
Exception: PlantUML does not appear functional
error: Unable to load diagram plugin, check console for details.
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 157, in on_api_ready
m.plugin_loaded()
File "/Users/Library/Application Support/Sublime Text 3/Packages/jvantuyl-sublime_diagram_plugin-9c079d7/diagram_plugin.py", line 26, in plugin_loaded
setup()
File "/Users/Library/Application Support/Sublime Text 3/Packages/jvantuyl-sublime_diagram_plugin-9c079d7/diagram/init.py", line 49, in setup
raise Exception('No working processors found!')
Exception: No working processors found!
The following from PlantUML does not run, only because of the collections line
@startuml
actor Foo1
boundary Foo2
control Foo3
entity Foo4
database Foo5
collections Foo6
Foo1 -> Foo2 : To boundary
Foo1 -> Foo3 : To control
Foo1 -> Foo4 : To entity
Foo1 -> Foo5 : To database
Foo1 -> Foo6 : To collections
@enduml
Any help or is this not supported at all?
Per their doc at http://plantuml.sourceforge.net/command_line.html, how can I specify it in the config?
Configuration file
You can also provide a configuration file which will be included before each diagram:
java -jar plantuml.jar -config "./config.cfg" dir1
When I write it with Chinese in ".wsd" file, I got a garble
Upon adding the sublime_diagram_plugin folder to Packages, Sublime Text 3 sent the following to its console (seems it's almost working):
reloading plugin sublime_diagram_plugin.diagram_plugin
error: Unable to load diagram plugin, check console for details.
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 116, in reload_plugin
m.plugin_loaded()
File "/Users//Library/Application Support/Sublime Text 3/Packages/sublime_diagram_plugin/diagram_plugin.py", line 26, in plugin_loaded
setup()
File "/Users///Library/Application Support/Sublime Text 3/Packages/sublime_diagram_plugin/diagram/init.py", line 34, in setup
print("Viewer Setting: " + sublime_settings.get("viewer"))
TypeError: Can't convert 'NoneType' object to str implicitly
generating syntax summary
no command for selector: noop:
using gpu buffer for window
SublimeLinter: annotations activated:
for instance Bob --> Alice is not properly done. it is something with the regular expresion
Hi,
have you considered submitting this plugin to Package Control for easier installation and updating?
https://packagecontrol.io/docs/submitting_a_package
if I have a lines like this:
:don't break the code!|
:you're coding all night|
the text between the apostrophe's is assumed to be a quote. In this example the highlighting stops on the second line, but in my specific case I only had one apostrophe and no more after for 10 lines or more... so the entire remainder of the document is highlighted yellow as a result.
Would it be possible to do something like that? Or at least update a file automatically so that user can put it on 2nd monitor.
IntelliJ has a plugin that can do this and I have to say it is quite useful.
Hello,
I get this error after I unpack plugin in sublime text 3 packages folder (on windows 8):
reloading plugin sublime_diagram_plugin.diagram_plugin
Viewer Setting: Preview
Loading processor class: <class 'sublime_diagram_plugin.diagram.plantuml.PlantUMLProcessor'>
Unable to load processor: <class 'sublime_diagram_plugin.diagram.plantuml.PlantUMLProcessor'>
Traceback (most recent call last):
File "C:\Users\dskopa\AppData\Roaming\Sublime Text 3\Packages\sublime_diagram_plugin\diagram__init__.py", line 34, in setup
proc.load()
File "C:\Users\dskopa\AppData\Roaming\Sublime Text 3\Packages\sublime_diagram_plugin\diagram\plantuml.py", line 40, in load
self.check_dependencies()
File "C:\Users\dskopa\AppData\Roaming\Sublime Text 3\Packages\sublime_diagram_plugin\diagram\plantuml.py", line 46, in check_dependencies
if not check_call("which java > /dev/null", shell=True) == 0:
File "X/subprocess.py", line 545, in check_call
subprocess.CalledProcessError: Command 'which java > /dev/null' returned non-zero exit status 1
error: Unable to load diagram plugin, check console for details.
Java sdk and Graphviz are installed.
What else should I check for?
I get the following error when using the render selection feature. I have a user config like so:
{
"output_format": "svg",
// The full path to the plantuml.jar file
"jar_file": "/usr/local/Cellar/plantuml/1.2018.3/libexec/plantuml.jar"
}
Default config remains unchanged. (As an aside, the default config uses a windows path...)
error: No diagrams overlap selections.
Nothing to process.```
plantuml has been installed via homebrew and functions normally from the command line.
Followed the instructions but no diagram is produced.
Environment OSX El Capitan
Steps to reproduce
I get the error message:
No diagrams overlap selections
Is triggered with this code
class DisplayDiagrams(TextCommand):
def run(self, edit):
print("Processing diagrams in %r..." % self.view)
if not process(self.view):
error_message("No diagrams overlap selections.\n\n" \
"Nothing to process.")
I select the following code
def extract_sections_from_html(self, page, BASE_URL):
"""
Extract sections (Section->SubSection) from the html page
"""
def _make_url(section_soup): # FIXME: Extract from here and test
try:
return BASE_URL + section_soup.ul.a['href']
except AttributeError:
# Section might be empty and contain no links
return None
def _get_section_name(section_soup): # FIXME: Extract from here and test
try:
return section_soup.h3.a.string.strip()
except AttributeError:
return None
def _make_subsections(section_soup):
try:
subsections_soup = section_soup.ul.find_all("li")
except AttributeError:
return []
# FIXME correct extraction of subsection.name (unicode)
subsections = [SubSection(position=i,
url=BASE_URL + s.a['href'],
name=s.p.get_text().replace('current section',''))
for i, s in enumerate(subsections_soup, 1)]
return subsections
soup = BeautifulSoup(page)
sections_soup = soup.find_all('div', attrs={'class': 'chapter'})
sections = [Section(position=i,
name=_get_section_name(section_soup),
url=_make_url(section_soup),
subsections=_make_subsections(section_soup))
for i, section_soup in enumerate(sections_soup, 1)]
# Filter out those sections for which name or url could not be parsed
sections = [section for section in sections
if section.name and section.url]
return sections
I would love to have this plugin utilize split views and the built in ST3 image viewer so that I could see live updates of my diagram (or updates on save) side-by-side with the plant uml.
installed this plugin
Sublime 2 sees this plugin in packages list
Im trying to press cmd+m while selecting a script but nothing happens.
How to run script (plantuml)?
Hi,
thanks for the plugin. Works like a charm when selecting a block of text. Is it possible to try to render the whole file if no selection was detected ?
I am using plain text files to create diagrams ... the need to select the text first destroys the "flow"...
thanks anyway, Julian
Any way to reload the resulting PNG in the same viewer window. In this case the PNG can also be overwritten IMHO. Would be better in fast iteration developing mode.
Hello,
I have created a diagram in sublime and used your plugin to generate it.
Problem is, it generates using something called "qlmanage" and theres no way of saving / printing the diagram! The only thing I can do is close it using this.
How can I save the outputted diagram?
Machine Details: 2010 Macbook Pro, Mac OS X Mountain Lion, Sublime Text 2 v2.0.1 build 2217.
Impossible to install via package control as it shows 'MISSING' status: http://shot.kim.aero/20170209150449-0cd4bbfb-71f9-4dea-a8a2-e711c1704e8b-wqLR6.png
Tried to install from repository, got the following:
error: Unable to load diagram plugin, check console for details.
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 157, in reload_plugin
m.plugin_loaded()
File "/Users/denis/Library/Application Support/Sublime Text 3/Packages/sublime_diagram_plugin/diagram_plugin.py", line 26, in plugin_loaded
setup()
File "/Users/denis/Library/Application Support/Sublime Text 3/Packages/sublime_diagram_plugin/diagram/__init__.py", line 36, in setup
print("Viewer Setting: " + sublime_settings.get("viewer"))
TypeError: Can't convert 'NoneType' object to str implicitly
generating syntax summary
Please add -Dplantuml.include.path arg to support preprocessings like this "!include styles.wsd".
command = [
'java',
'-Dplantuml.include.path=%s' % split(self.sourceFile)[0],
'-jar',
self.proc.plantuml_jar_path,
'-pipe',
'-tpng'
]
The plugin only registers web sequence diagram (.wsd) files. Since it uses plantuml to generate the diagrams, it could as well open all plantuml files (*.pu, *.puml, *.uml, *.plantuml).
this version has more keywords in the sequence diagrams, in particular 'database'
It would be great if we could add a configuration flag pointing to an include file and have the plugin include this file in the call to plantuml.jar. (-I command line flag).
The use case is that I have an include file to tune the look and feel of the diagrams and it would be very useful if I could have the plugin pick it up.
As mentioned in issue #35 it would be nice to have the option whether or not to clean up the generated images.
This in the case where the uml is part of generated documentation and we just want to preview the image from time to time without generating the whole documentation.
Thanks,
Hi, I am interested in using the "teoz" engine for "multicast" events in secuences. For instance I would like to do this:
@startuml
!pragma teoz true
Alice -> Bob : hello
& Bob -> Charlie : hi
@enduml
However this is giving me an error :) Is there a way to fix it?
I installed sublime_diagram_plugin through Package Control on macOSX. However, I can't access the example file, Settings, and Keybindings. I found that ST 3 has wrong location definition. The Package Control installed this package to ${packages}/Diagram, but the package defines its location to ${pacakges}/sublime_diagram_plugin in Main.sublime-menu. I report this issue here because of Package Control's recommendation. https://github.com/wbond/package_control_channel/pull/6970
Hi,
I tried installing the plugin with Package Control (v2.0.0-alpha9) on Sublime Text 3 (build 3047), but get the following error:
reloading plugin Diagram.diagram_plugin
Viewer Setting: Preview
Loading processor class: <class 'Diagram.diagram.plantuml.PlantUMLProcessor'>
Unable to load processor: <class 'Diagram.diagram.plantuml.PlantUMLProcessor'>
Traceback (most recent call last):
File "diagram in /home/todor/.config/sublime-text-3/Installed Packages/Diagram.sublime-package", line 34, in setup
File "diagram.plantuml in /home/todor/.config/sublime-text-3/Installed Packages/Diagram.sublime-package", line 41, in load
File "diagram.plantuml in /home/todor/.config/sublime-text-3/Installed Packages/Diagram.sublime-package", line 81, in find_plantuml_jar
Exception: can't find plantuml-7963.jar
error: Unable to load diagram plugin, check console for details.
Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 115, in reload_plugin
m.plugin_loaded()
File "diagram_plugin in /home/todor/.config/sublime-text-3/Installed Packages/Diagram.sublime-package", line 26, in plugin_loaded
File "diagram in /home/todor/.config/sublime-text-3/Installed Packages/Diagram.sublime-package", line 41, in setup
Exception: No working processors found!
Hope this is useful to you in case anyone else faces the same problem.
Please update to the latest version to support mind mapping. The latest plantuml does not depend on dot tools,exp :
plantuml-nodot.1.2021.2.jar
Thanks to our tests (which were failing for your package due to unexpected BOM) it came to my attention that you didn't update your packages.json properly, especially last_modified
.
I suggest you to migrate to the default repositories, which use the 3.0.0 package schema that automatically finds tags pushed to your repo.
However, these tags must be valid semantic versions (with optional leading v
).
Please see wbond/package_control_channel@ebf2992 and https://github.com/wbond/package_control/blob/master/example-repository.json on how to proceed.
I got this on my console when I ran it on the example diagrams at example.wsd
. I fixed this evandrocoan@7a89dee, but now no diagrams show up. How can I know what is the error?
Rendering [(<PlantUmlDiagrams.diagram.plantuml.PlantUMLProcessor object at 0x05F347D0>, ['\nComponent diagram 1\n\n@startuml\n\nskinparam componentStyle uml2\n\ncloud "GoogleDocs" {\n [GDOC docs]\n}\n\n[GDOC docs] --> [DOCX docs] : Download\n[DOCX docs] --> [MD parts] : DocConvert\n[MD parts] --> [Drupal feed] : book-parts-to-feed\n[MD parts] --> [MD eBook] : book-join\n[MD parts] --> [HTML parts] : pandoc\n[MD eBook] --> [HTML eBook] : pandoc\n[MD eBook] --> [FB2 eBook] : calibre\n[MD eBook] --> [EPUB eBook] : calibre\n[MD eBook] --> [MOBI eBook] : calibre\n\n@enduml\n\n----------------------------------------------------------\n\nComponent diagram 2\n\n@startuml\n\nskinparam component {\n Style uml2\n BackgroundColor #FEFECE\n}\nnode "Database Server" {\n database "MSSQL / ORA \\n " {\n [DB] as DB\n }\n}\nnode "Business Logic Server" {\n frame "Windows Service Host" {\n package "GUIService" {\n [GuiService] as GuiService\n }\n package "ExtService" {\n [ExtService] as ExtService\n }\n }\n}\nnode "Update Server \\n (can be hosted on \\n BL Server)" {\n folder "Remote Storage" {\n [System Storage] as UpdateStorage\n }\n}\nnode "Client Computer" {\n folder "Local Storage" {\n [System Client] as Client\n }\n}\ncloud "External Systems" {\n [External Systems] as ExtSystem\n}\n\ncloud "Service Locator" {\n [Service Locator] as ServiceLocator\n}\ncloud "OSSBSS Services" {\n [OSSBSS Services] as OSSBSS\n}\ncloud "Security \\n (Authority \\n Service)" {\n [OSSBSS Security] as Security\n}\n[Client] --> [GuiService] : WCF HTTP/TCP\n[ExtSystem] --> [ExtService] : WCF HTTP\n[GuiService] --> [DB] : OSSBSS.DbAccessLayer\n[GuiService] --> [UpdateStorage] : SMB\n[GuiService] --> [Security] : WCF\n[GuiService] --> [ServiceLocator] : WCF\n[ServiceLocator] --> [OSSBSS] : WCF\n[ExtService] --> [DB] : OSSBSS.DbAccessLayer\n[ExtService] ..> [GuiService] : inproc\n\n@enduml\n\n--------------------------------------------------------------------------------\n\nState diagram\n\n@startuml\n\n[*] --> proposed : external \\n request \\n registered in \\n host system\nproposed --> active : request \\n accepted\nproposed --> rejected : operator \\n rejected \\n request\nproposed --> cancelled : request \\n cancelled \\n by external \\n system\nactive --> resolved : new data \\n assigned\nactive --> proposed : request \\n reverted\nactive --> cancelled : request \\n cancelled \\n by external \\n system \\n or by \\n power-user, \\n data \\n reverted\nactive --> rejected : no tech \\n capability\nresolved --> completed : assigned data \\n confirmed\nresolved --> active : in case of correction\nresolved --> cancelled : assigned data \\n reverted\ncompleted --> [*]\nrejected --> [*]\ncancelled --> [*]\n\nproposed : New\nactive : In Work\nresolved : Processed\ncompleted : Confirmed\ncancelled : Cancelled\nrejected : Rejected\n\n@enduml'])]
Rendering diagram for block: '\nComponent diagram 1\n\n@startuml\n\nskinparam componentStyle uml2\n\ncloud "GoogleDocs" {\n [GDOC docs]\n}\n\n[GDOC docs] --> [DOCX docs] : Download\n[DOCX docs] --> [MD parts] : DocConvert\n[MD parts] --> [Drupal feed] : book-parts-to-feed\n[MD parts] --> [MD eBook] : book-join\n[MD parts] --> [HTML parts] : pandoc\n[MD eBook] --> [HTML eBook] : pandoc\n[MD eBook] --> [FB2 eBook] : calibre\n[MD eBook] --> [EPUB eBook] : calibre\n[MD eBook] --> [MOBI eBook] : calibre\n\n@enduml\n\n----------------------------------------------------------\n\nComponent diagram 2\n\n@startuml\n\nskinparam component {\n Style uml2\n BackgroundColor #FEFECE\n}\nnode "Database Server" {\n database "MSSQL / ORA \\n " {\n [DB] as DB\n }\n}\nnode "Business Logic Server" {\n frame "Windows Service Host" {\n package "GUIService" {\n [GuiService] as GuiService\n }\n package "ExtService" {\n [ExtService] as ExtService\n }\n }\n}\nnode "Update Server \\n (can be hosted on \\n BL Server)" {\n folder "Remote Storage" {\n [System Storage] as UpdateStorage\n }\n}\nnode "Client Computer" {\n folder "Local Storage" {\n [System Client] as Client\n }\n}\ncloud "External Systems" {\n [External Systems] as ExtSystem\n}\n\ncloud "Service Locator" {\n [Service Locator] as ServiceLocator\n}\ncloud "OSSBSS Services" {\n [OSSBSS Services] as OSSBSS\n}\ncloud "Security \\n (Authority \\n Service)" {\n [OSSBSS Security] as Security\n}\n[Client] --> [GuiService] : WCF HTTP/TCP\n[ExtSystem] --> [ExtService] : WCF HTTP\n[GuiService] --> [DB] : OSSBSS.DbAccessLayer\n[GuiService] --> [UpdateStorage] : SMB\n[GuiService] --> [Security] : WCF\n[GuiService] --> [ServiceLocator] : WCF\n[ServiceLocator] --> [OSSBSS] : WCF\n[ExtService] --> [DB] : OSSBSS.DbAccessLayer\n[ExtService] ..> [GuiService] : inproc\n\n@enduml\n\n--------------------------------------------------------------------------------\n\nState diagram\n\n@startuml\n\n[*] --> proposed : external \\n request \\n registered in \\n host system\nproposed --> active : request \\n accepted\nproposed --> rejected : operator \\n rejected \\n request\nproposed --> cancelled : request \\n cancelled \\n by external \\n system\nactive --> resolved : new data \\n assigned\nactive --> proposed : request \\n reverted\nactive --> cancelled : request \\n cancelled \\n by external \\n system \\n or by \\n power-user, \\n data \\n reverted\nactive --> rejected : no tech \\n capability\nresolved --> completed : assigned data \\n confirmed\nresolved --> active : in case of correction\nresolved --> cancelled : assigned data \\n reverted\ncompleted --> [*]\nrejected --> [*]\ncancelled --> [*]\n\nproposed : New\nactive : In Work\nresolved : Processed\ncompleted : Confirmed\ncancelled : Cancelled\nrejected : Rejected\n\n@enduml'
chdir to: F:\SublimeText\Data\Packages\PlantUmlDiagrams\samples
Error Processing Diagram:
Here are some complex examples
----------------------------------------------------------
Component diagram 1
@startuml
skinparam componentStyle uml2
cloud "GoogleDocs" {
[GDOC docs]
}
[GDOC docs] --> [DOCX docs] : Download
[DOCX docs] --> [MD parts] : DocConvert
[MD parts] --> [Drupal feed] : book-parts-to-feed
[MD parts] --> [MD eBook] : book-join
[MD parts] --> [HTML parts] : pandoc
[MD eBook] --> [HTML eBook] : pandoc
[MD eBook] --> [FB2 eBook] : calibre
[MD eBook] --> [EPUB eBook] : calibre
[MD eBook] --> [MOBI eBook] : calibre
@enduml
----------------------------------------------------------
Component diagram 2
@startuml
skinparam component {
Style uml2
BackgroundColor #FEFECE
}
node "Database Server" {
database "MSSQL / ORA \n " {
[DB] as DB
}
}
node "Business Logic Server" {
frame "Windows Service Host" {
package "GUIService" {
[GuiService] as GuiService
}
package "ExtService" {
[ExtService] as ExtService
}
}
}
node "Update Server \n (can be hosted on \n BL Server)" {
folder "Remote Storage" {
[System Storage] as UpdateStorage
}
}
node "Client Computer" {
folder "Local Storage" {
[System Client] as Client
}
}
cloud "External Systems" {
[External Systems] as ExtSystem
}
cloud "Service Locator" {
[Service Locator] as ServiceLocator
}
cloud "OSSBSS Services" {
[OSSBSS Services] as OSSBSS
}
cloud "Security \n (Authority \n Service)" {
[OSSBSS Security] as Security
}
[Client] --> [GuiService] : WCF HTTP/TCP
[ExtSystem] --> [ExtService] : WCF HTTP
[GuiService] --> [DB] : OSSBSS.DbAccessLayer
[GuiService] --> [UpdateStorage] : SMB
[GuiService] --> [Security] : WCF
[GuiService] --> [ServiceLocator] : WCF
[ServiceLocator] --> [OSSBSS] : WCF
[ExtService] --> [DB] : OSSBSS.DbAccessLayer
[ExtService] ..> [GuiService] : inproc
@enduml
--------------------------------------------------------------------------------
State diagram
@startuml
[*] --> proposed : external \n request \n registered in \n host system
proposed --> active : request \n accepted
proposed --> rejected : operator \n rejected \n request
proposed --> cancelled : request \n cancelled \n by external \n system
active --> resolved : new data \n assigned
active --> proposed : request \n reverted
active --> cancelled : request \n cancelled \n by external \n system \n or by \n power-user, \n data \n reverted
active --> rejected : no tech \n capability
resolved --> completed : assigned data \n confirmed
resolved --> active : in case of correction
resolved --> cancelled : assigned data \n reverted
completed --> [*]
rejected --> [*]
cancelled --> [*]
proposed : New
active : In Work
resolved : Processed
completed : Confirmed
cancelled : Cancelled
rejected : Rejected
@enduml
<PlantUmlDiagrams.diagram.sublime3.Sublime3Viewer object at 0x05B5B110> viewing []
After the installation, the following error appears as follows:
Loading processor class: <class 'sublime_diagram_plugin.diagram.plantuml.PlantUMLProcessor'>
Detected 'C:\Users\Admin\AppData\Roaming\Sublime Text 3\Packages\sublime_diagram_plugin\diagram\plantuml.1.2018.1.jar'
Version Detection:
b'PlantUML version 1.2018.01 (Mon Jan 29 02:08:22 CST 2018)\r\n(GPL source distribution)\r\nJava Runtime: Java(TM) SE Runtime Environment\r\nJVM: Java HotSpot(TM) Client VM\r\nJava Version: 1.8.0_144-b01\r\nOperating System: Windows 10\r\nOS Version: 10.0\r\nDefault Encoding: GBK\r\nLanguage: zh\r\nCountry: CN\r\nMachine: LapTopS4KUA-Q\r\nPLANTUML_LIMIT_SIZE: 4096\r\nProcessors: 4\r\nMax Memory: 259,522,560\r\nTotal Memory: 16,252,928\r\nFree Memory: 12,276,536\r\nUsed Memory: 3,976,392\r\nThread Active Count: 1\r\n\r\nThe environment variable GRAPHVIZ_DOT has been set to C:\Program Files (x86)\Graphviz2.38\bin\dot.exe\r\nDot executable is C:\Program Files (x86)\Graphviz2.38\bin\dot.exe\r\nDot version: dot - graphviz version 2.38.0 (20140413.2041)\r\r\nInstallation seems OK. File generation OK\r\n'
PlantUML Smoke Check:
b'The environment variable GRAPHVIZ_DOT has been set to C:\Program Files (x86)\Graphviz2.38\bin\dot.exe\r\nDot executable is C:\Program Files (x86)\Graphviz2.38\bin\dot.exe\r\nDot version: dot - graphviz version 2.38.0 (20140413.2041)\r\r\nInstallation seems OK. File generation OK\r\n'
Loaded processor: <sublime_diagram_plugin.diagram.plantuml.PlantUMLProcessor object at 0x000001C52A4DDA90>
Loading viewer class from configuration: <class 'sublime_diagram_plugin.diagram.preview.PreviewViewer'>
Unable to load configured viewer, falling back to autodetection...
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Roaming\Sublime Text 3\Packages\sublime_diagram_plugin\diagram_init_.py", line 59, in setup
vwr.load()
File "C:\Users\Admin\AppData\Roaming\Sublime Text 3\Packages\sublime_diagram_plugin\diagram\preview.py", line 8, in load
raise Exception("Currently only supported on MacOS")
Exception: Currently only supported on MacOS
Trying Viewer Sublime3Viewer
Loading viewer class: <class 'sublime_diagram_plugin.diagram.sublime3.Sublime3Viewer'>
Loaded viewer: <sublime_diagram_plugin.diagram.sublime3.Sublime3Viewer object at 0x000001C52A4E46A0>
Processors: [<sublime_diagram_plugin.diagram.plantuml.PlantUMLProcessor object at 0x000001C52A4DDA90>]
Viewer: <sublime_diagram_plugin.diagram.sublime3.Sublime3Viewer object at 0x000001C52A4E46A0>
The default configuration error of the Diagram.sublime-settings file is checked
"Viewer": "Preview", after changing to Sublime3Viewer, the problem is solved
Hey, this is jebbs. I modified a version of my own, which makes improvements as below. Since I am a starter in python, I won't commit my code, but hope you will adopt some of them if you think it will make the plug-in better. Thank you.
alt m for preview,
shift alt m for final output
when generating diagrams that include other files, plantuml will look for those files in the sublime package directory, instead of the opened file's directory.
The second line after the first '
should not be also a comment. But all the line after the first '
become a comment when using both available syntaxes for diagram.
References:
The generated .png files are not cleaned up as mentioned in the documentation.
All files are created in such a way that they will be cleaned up unless Sublime Text dies a particularly horrible death.
I'm running ST3 on Ubuntu 14.04
PlantUML build 8027
Tip: Currently only supported on MacOS
Package Control: Skipping automatic upgrade, last run at 2018-06-29 16:30:25, next run at 2018-06-29 17:30:25 or after
reloading settings Packages/User/Package Control.sublime-settings
ignored packages updated to: ["Diagram", "Vintage"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading settings Packages/User/Package Control.sublime-settings
ignored packages updated to: ["Vintage"]
reloading plugin Diagram.diagram_plugin
Viewer Setting: Preview
Loading processor class: <class 'Diagram.diagram.plantuml.PlantUMLProcessor'>
Detected 'C:\Users\shaos\AppData\Roaming\Sublime Text 3\Packages\Diagram\diagram\plantuml.1.2018.1.jar'
Version Detection:
b'PlantUML version 1.2018.01 (Mon Jan 29 02:08:22 CST 2018)\r\n(GPL source distribution)\r\nJava Runtime: Java(TM) SE Runtime Environment\r\nJVM: Java HotSpot(TM) Client VM\r\nJava Version: 1.8.0_171-b11\r\nOperating System: Windows 10\r\nOS Version: 10.0\r\nDefault Encoding: GBK\r\nLanguage: zh\r\nCountry: CN\r\nMachine: SHAOSHIQIANG-WORK-COMPUTER\r\nPLANTUML_LIMIT_SIZE: 4096\r\nProcessors: 4\r\nMax Memory: 259,522,560\r\nTotal Memory: 16,252,928\r\nFree Memory: 12,267,504\r\nUsed Memory: 3,985,424\r\nThread Active Count: 1\r\n\r\nThe environment variable GRAPHVIZ_DOT has been set to D:\Program Files (x86)\Graphviz2.38\bin\dot.exe\r\nDot executable is D:\Program Files (x86)\Graphviz2.38\bin\dot.exe\r\nDot version: dot - graphviz version 2.38.0 (20140413.2041)\r\r\nInstallation seems OK. File generation OK\r\n'
PlantUML Smoke Check:
b'The environment variable GRAPHVIZ_DOT has been set to D:\Program Files (x86)\Graphviz2.38\bin\dot.exe\r\nDot executable is D:\Program Files (x86)\Graphviz2.38\bin\dot.exe\r\nDot version: dot - graphviz version 2.38.0 (20140413.2041)\r\r\nInstallation seems OK. File generation OK\r\n'
Loaded processor: <Diagram.diagram.plantuml.PlantUMLProcessor object at 0x000001E60784D048>
Loading viewer class from configuration: <class 'Diagram.diagram.preview.PreviewViewer'>
Unable to load configured viewer, falling back to autodetection...
Traceback (most recent call last):
File "C:\Users\shaos\AppData\Roaming\Sublime Text 3\Packages\Diagram\diagram_init_.py", line 59, in setup
vwr.load()
File "C:\Users\shaos\AppData\Roaming\Sublime Text 3\Packages\Diagram\diagram\preview.py", line 8, in load
raise Exception("Currently only supported on MacOS")
Exception: Currently only supported on MacOS
Trying Viewer Sublime3Viewer
Loading viewer class: <class 'Diagram.diagram.sublime3.Sublime3Viewer'>
Loaded viewer: <Diagram.diagram.sublime3.Sublime3Viewer object at 0x000001E607E4F080>
Processors: [<Diagram.diagram.plantuml.PlantUMLProcessor object at 0x000001E60784D048>]
Viewer: <Diagram.diagram.sublime3.Sublime3Viewer object at 0x000001E607E4F080>
generating meta info summary
generating syntax summary
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
Hi, I would like to know why is not working the pages parameter with the plugin, it would be quite useful to be able of spliting big uml diagrams in several images.
Ex:
@startuml img/classes09.png
' Split into 4 pages
page 2x2
class BaseClass
namespace net.dummy #DDDDDD
.BaseClass <|-- Person
Meeting o-- Person
.BaseClass <|- Meeting
end namespace
namespace net.foo {
net.dummy.Person <|- Person
.BaseClass <|-- Person
net.dummy.Meeting o-- Person
}
BaseClass <|-- net.unused.Person
@enduml
BTW, amazing project.
My sublime3 has been working normally, but suddenly it cannot output pictures. It is normal to call the .jar package directly, and I cannot view the log output.
Please help
Sublime3:build 3211
Java: build 1.8.0_102-b14
Config:
{
"viewer" : "Preview",
"check_on_startup": 1,
"plantuml_server": "", //https://www.plantuml.com/plantuml/",
"jar_file": "~/.jar/plantuml.jar",
"charset": "UTF-8"
}
plantuml.jar:Version 1.2020.15
Upon install package via package control right after installing Graphviz and java via homebrew
Environment
Windows 8.1
Sublime_text 3
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode, sharing)
Plugin installed with package control. Not zipped in packages folder.
Sublime gives error message
Processing diagrams in <sublime.View object at 0x0000002FC3FF4048>...
error: No diagrams overlap selections.Nothing to process.
Running plantUML example code. Entire file or single diagrams selected. Works with plantUML by itself so it's just the plugin.
Here are some complex examples
----------------------------------------------------------
Component diagram 1
@startuml
skinparam componentStyle uml2
cloud "GoogleDocs" {
[GDOC docs]
}
[GDOC docs] --> [DOCX docs] : Download
[DOCX docs] --> [MD parts] : DocConvert
[MD parts] --> [Drupal feed] : book-parts-to-feed
[MD parts] --> [MD eBook] : book-join
[MD parts] --> [HTML parts] : pandoc
[MD eBook] --> [HTML eBook] : pandoc
[MD eBook] --> [FB2 eBook] : calibre
[MD eBook] --> [EPUB eBook] : calibre
[MD eBook] --> [MOBI eBook] : calibre
@enduml
----------------------------------------------------------
Component diagram 2
@startuml
skinparam component {
Style uml2
BackgroundColor #FEFECE
}
node "Database Server" {
database "MSSQL / ORA \n " {
[DB] as DB
}
}
node "Business Logic Server" {
frame "Windows Service Host" {
package "GUIService" {
[GuiService] as GuiService
}
package "ExtService" {
[ExtService] as ExtService
}
}
}
node "Update Server \n (can be hosted on \n BL Server)" {
folder "Remote Storage" {
[System Storage] as UpdateStorage
}
}
node "Client Computer" {
folder "Local Storage" {
[System Client] as Client
}
}
cloud "External Systems" {
[External Systems] as ExtSystem
}
cloud "Service Locator" {
[Service Locator] as ServiceLocator
}
cloud "OSSBSS Services" {
[OSSBSS Services] as OSSBSS
}
cloud "Security \n (Authority \n Service)" {
[OSSBSS Security] as Security
}
[Client] --> [GuiService] : WCF HTTP/TCP
[ExtSystem] --> [ExtService] : WCF HTTP
[GuiService] --> [DB] : OSSBSS.DbAccessLayer
[GuiService] --> [UpdateStorage] : SMB
[GuiService] --> [Security] : WCF
[GuiService] --> [ServiceLocator] : WCF
[ServiceLocator] --> [OSSBSS] : WCF
[ExtService] --> [DB] : OSSBSS.DbAccessLayer
[ExtService] ..> [GuiService] : inproc
@enduml
--------------------------------------------------------------------------------
State diagram
@startuml
[*] --> proposed : external \n request \n registered in \n host system
proposed --> active : request \n accepted
proposed --> rejected : operator \n rejected \n request
proposed --> cancelled : request \n cancelled \n by external \n system
active --> resolved : new data \n assigned
active --> proposed : request \n reverted
active --> cancelled : request \n cancelled \n by external \n system \n or by \n power-user, \n data \n reverted
active --> rejected : no tech \n capability
resolved --> completed : assigned data \n confirmed
resolved --> active : in case of correction
resolved --> cancelled : assigned data \n reverted
completed --> [*]
rejected --> [*]
cancelled --> [*]
proposed : New
active : In Work
resolved : Processed
completed : Confirmed
cancelled : Cancelled
rejected : Rejected
@enduml
Find it here
I believe I have installed the diagram plugin. What next? I have a sample uml file, but how to visualize? Is there a hot key?
Please provide some step-by-step installation description.
Hi Jayson,
what do you think about adding an additional falg in the preferences for the output format of the rendered image? :) something like:
{
"viewer" : "Preview", // Preview, QuickLook, EyeOfGnome, WindowsDefaultViewer
"format" : "svg", // png, svg, ascii
"check_on_startup": true,
"charset": null // Can be "UTF-8" - to support non-latin text in diagram
}
the plantuml library already has the appropriate methods for outputting svg images :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.