Viewing Scaladoc in Eclipse
Asked Answered
E

2

47

In Eclipse I have set the Javadoc Location property of my Scala project to file:/D:/EclipseWorkspace/MyProject/target/scala-2.9.1/api where D:/EclipseWorkspace/MyProject is the location of my scala project.

Now, if I am in a Scala file that implements a class/trait, when I type Shift+F2, Eclipse opens the Scaladoc page of that class/trait. However, this does not work if it is an object since Eclipse tries to open <ObjectName>.html whereas the Scaladoc-generated file name is <ObjectName>$.html.

Is there any workaround?

Encarnalize answered 3/5, 2012 at 10:47 Comment(4)
AFAIK, no. In fact, even inside Scaladoc itself one cannot link to objects. If you look at the pages I wrote, like Regex or the stuff inside scala.sys.process, you'll see the convoluted way I refer to them, instead of simply linking to them. Mind you, I'm not claiming Scaladoc's limitation has anything to do with Eclipse's limitation.Wrongdoer
@Daniel C. Sobral. Thanks. If it doesn't work in Scaladoc itself, one can not expect it to work with eclipse javadoc mechanism. I was just hoping that if we know the mangled names of the generated class files for the objects then we can somehow trick Eclipse to open the corresponding html. (This will be just a temporary workaround since the mangled names might change in future versions of scala/scaladoc) The ideal way would be scaladoc supports object links and then Scala-IDE overrides Shift-F2Encarnalize
Having tried a few different setups of Eclipse and scala versions, I've never been able to get anything more than code completion to operate, and have often wondered how (if possible) to see JavaDoc information in realtimeProtuberancy
The scaladoc intergration is mentioned in this issue: assembla.com/spaces/scala-ide/tickets/1000860 It seems it's still a while before it's added.Hora
L
16

Scaladoc is now integrated since release 4.0.0 RC1 of the Scala-IDE plugin. You can just hover over your term, or press F2 while the cursor is on the identifier.

Latrinalatrine answered 29/10, 2014 at 11:24 Comment(0)
V
4

Typesafe has announced a plugin for the Scala compiler which generates JavaDoc for your Scala API. The plugin and its documentation is available on github. Maybe this helps as a workaround.

Vintage answered 20/3, 2013 at 9:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.