3

I want to start generating scaladocs from my Eclipse project. I don't use SBT, but am willing to import my eclipse project to sbt if it is needed.

How do I generate Scaladocs from an eclipse Scala project?

Felix
  • 8,385
  • 10
  • 40
  • 59
  • I almost would flag this as *not constructive* as it will provoke subjective answers. You should better ask something like "How can I invoke Scaladocs generation from Eclipse?" or something like that. – Jan Gerlinger Mar 26 '13 at 14:28

1 Answers1

1

As far as I know, there is no direct method supported by the Scala plugin for Eclipse without using SBT or Maven.

As a workaround, you can go to Run -> External Tools -> External Tools Configurations... and setup the scaladoc tool there as a Program. This way you would have a one-click solution for generating Scaladocs.

Jan Gerlinger
  • 7,361
  • 1
  • 44
  • 52
  • Can you maybe offer a step by step guide? – Felix Mar 26 '13 at 18:01
  • Create a shell script in your project root with this command: `scaladoc -d docs $(find src/ -name *.scala)`. Then setup your external tools configuration [like this](http://www.eclipse.org/forums/index.php/mv/tree/23171/#page_top) to run this shell script. – Jan Gerlinger Mar 26 '13 at 19:26
  • Interesting. Will try this tomorrow when I get to the office :) – Felix Mar 26 '13 at 20:31
  • This nets me 61 errors all of which are bogus, e.g.:src/it/vigtig/foopar/FooParApp.scala:53: error: ')' expected but string literal found. def pprint(s: Any*): Unit = print(s"Rank${_distributor.get.globalRank}: " + s.mkString(", ")) In a project that compiles and runs just fine in eclipse. – Felix Mar 27 '13 at 10:25
  • Sorry, then your setup probably needs some compiler options to be set for scaladoc (as described in scaladoc's man page). In this situation, your best option is probably to setup SBT or Maven. – Jan Gerlinger Mar 27 '13 at 11:20