सबसे पहले, इसके लिए स्केलडोक 2 की आवश्यकता होती है, जो स्कैला 2.10 का हिस्सा है।
यदि 2.10 स्थापित है, तो चित्रों को उत्पन्न करने के लिए स्केलडोक को -diagrams
विकल्प को भी पास करने की आवश्यकता है।
Graphviz dot encountered an error when generating the diagram for:
_root_
These are usually spurious errors, but if you notice a persistant error on
a diagram, please use the -diagrams-debug flag and report a bug with the output.
Graphviz will be restarted...
त्रुटि तब होती है क्योंकि Scaladoc से ही चित्र उत्पन्न नहीं करता है लेकिन Graphviz कॉल करने के लिए, यह काम करने की कोशिश करता: लेकिन यदि आप ऐसा करते यह है कि निम्न त्रुटि संदेश होता है हो सकता है। हम -diagrams-debug
ध्वज जोड़ते हैं हम अच्छी तरह से अन्य बातों के अलावा प्राप्त सटीक त्रुटि संदेश:
The following is the log of the failure:
Main thread in _root_: Exception: java.io.IOException: Cannot run program "dot": java.io.IOException: error=2, No such file or directory
समस्या एक कार्यक्रम dot
, जो Graphviz का हिस्सा है स्थापित करने के लिए की जरूरत है हल करने के लिए। ऐसा करने के बाद scaladoc -diagrams <file>.scala
सफलतापूर्वक निष्पादित करने में सक्षम होना चाहिए और जेनरेट किए गए दस्तावेज़ में सदस्य खोज बार के ऊपर "टाइप पदानुक्रम" टैग के परिणामस्वरूप देखें।
-diagrams Create inheritance diagrams for classes, traits and packages.
-diagrams-dot-path <path> The path to the dot executable used to generate the inheritance diagrams. Eg: /usr/bin/dot
-diagrams-dot-restart <n> The number of times to restart a malfunctioning dot process before disabling diagrams (default: 5)
-diagrams-dot-timeout <n> The timeout before the graphviz dot util is forcefully closed, in seconds (default: 10)
-diagrams-max-classes <n> The maximum number of superclasses or subclasses to show in a diagram
-diagrams-max-implicits <n> The maximum number of implicitly converted classes to show in a diagram
:
निष्पादित scaladoc -help
चित्र विकल्प के लिए और अधिक जानकारी के से पता चलता