Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8846203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:55:22+00:00 2026-06-14T11:55:22+00:00

I want that Scaladoc generates a type hierarchy diagram for the following code snippet:

  • 0

I want that Scaladoc generates a type hierarchy diagram for the following code snippet:

trait A
trait B extends A

But when I execute scaladoc <file>.scala there is no type hierarchy shown – neither in A nor in B. How can I generate such diagrams?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:55:24+00:00Added an answer on June 14, 2026 at 11:55 am

    First, one needs Scaladoc2 for this, which is part of Scala 2.10.

    If 2.10 is installed, one also needs to pass the -diagrams option to Scaladoc in order to generate the diagrams. But if you do so it can be that the following error message occurs:

    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...
    

    The error occurs because Scaladoc does not generate the diagrams by itself but tries to call Graphviz, to do this job. When we add the -diagrams-debug flag we well get among other things the exact error message:

    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
    

    To solve the problem one needs to install the program dot, which is part of Graphviz. After doing so one should be able to execute scaladoc -diagrams <file>.scala successfully and see as a result the tag “Type Hierarchy” above the member search bar in the generated documentation.

    Executing scaladoc -help shows further information for the diagrams option:

      -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
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want that my bash script does the following: It finds a file, for
I want that screenCheck function show run only after Validation of #contact_email . But
I want that the form will not close by doing Alt + F4 but
I want that every user has a profile-url like this: www.example.com/username But my php
I want that my flash file on my website, can't be downloaded by anyone.
I want that real numbers would be for example 12.92, but not 12.9241. Is
I want that when I execute a query for example DELETE FROM Contact ,
I want that my listitem to still respond to onListItemClick() but additionally I want
I want that this code: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android > <TextView android:id=@+id/logo style=@style/logo android:layout_alignParentTop=true android:text=@string/logo tools:context=.MainActivity
I want that whenever i open a new c++ file in vim in linux

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.