Google Groups

Re: [scala-ide-dev] Re: Scaladoc in hovers and completions

Iulian Dragos Jul 19, 2011 6:44 AM
Posted in group: Scala IDE Dev
Hi Daniel,

In case you haven't started yet on the UI/non-UI refactoring, you can
take advantage of my latest commit: I just had to do the refactoring
myself in order to be able to test completions, and re-enable Mirco's
tests in a headless environment (remember, any code that touches UI
elements and tries to fire up a display will fail under Jenkins).

Basically, code that needs the UI to run is in
'', and code that implements core functionality
is in I believe it's easy to find
your way around those classes.


On Sat, Jul 16, 2011 at 5:46 PM, iulian dragos <> wrote:
> On Sat, Jul 16, 2011 at 11:01 AM, Daniel Ratiu <> wrote:
>> Hi Iulian,
>> I tried to compile the feature/hover-scaladoc-rebased but I did not
>> succeed.
>> For example, I get the following error message (when I try to build
>> with:
> This is because case-class inheritance has been removed from the trunk
> version of scala (future 2.10). It has been deprecated for several
> years. I already ported wip_experiment, so if you merge
> wip_experiment, you will be able to compile. This is the changeset:
> cheers,
> iulian
>> ---
>> org.scala-ide.sdt.core/src/scala/tools/eclipse/wizards/
>> CodeBuilder.scala:164: error: case class `class Args' has case
>> ancestor `class ParenList'. Case-to-case inheritance is prohibited. To
>> overcome this limitation use extractors to pattern match on non-leaf
>> nodes.
>> ---
>> I get the same error in my eclipse with the following version of Scala
>> plugin:
>> Which version of the scala plugin, which works fine with hover-
>> scaladoc-rebased, do I need in my eclipse or how can I build one?
>> have a nice weekend,
>> Daniel
>> On Jul 13, 3:22 pm, iulian dragos <> wrote:
>>> I spent some time today trying to merge-in the excellent contribution from
>>> Daniel and Marek. Thanks a lot! There are a couple of issues that, once
>>> resolved, we can finally take advantage of this extremely useful
>>> improvement.
>>> The codebase evolved since the contribution was made, and most importantly
>>> we have integration tests! Unfortunately, they don't pass with the scaladoc
>>> functionality.
>>> The first issue is related to how the scaladoc comments are built. Right
>>> now, the functionality is inside a trait that is mixed-in in the
>>> PresentationCompiler. Moreover, the functionality requires the UI to be
>>> fired up, because it retrieves some image identifiers. This is bad thing on
>>> several accounts, but mostly it makes the compiler unusable in a headless
>>> environment (such as the Jenkins nightly).
>>> I propose the functionality is split in two:
>>>  - functionality to retrieve the 'raw' scaladoc comment from a symbol, which
>>> could be part of the Scala Presentation Compiler (but not necessarily, I can
>>> see that migrating into ScalaProject as well -- up to you).
>>>  - functionality to build the 'rich' HTML to be displayed in the UI. This
>>> should be moved to the '' package
>>> Second, it would be great to have a few basic tests. The above split allows
>>> makes testing almost free :). So we'd need a test for the hovering component
>>> that can run during the nightly, therefore it needs to use only the non-UI
>>> part. There are already some tests in org.scala-ide.sdt.core.tests (look at
>>> StructureBuilderTest or HyperlinkDetectorTests (which also tests only the
>>> non-UI part) for examples how to use them), I plan to write up some
>>> documentation on how to write integration tests, but hopefully the existing
>>> ones are easy to understand. Let me know if you need help there.
>>> Things change quite a lot in the last few weeks, so there were some nasty
>>> merge conflicts when I rebased over wip_experiment. I pushed a new branch
>>> 'feature/hover-scaladoc-rebased that is up-to-date with the latest
>>> wip_experiment to save you the pain of re-merging (but I did not delete
>>> wip_hovering -- please delete it yourself if you are fine with my rebasing).
>>> Right now the tests pass, but still fire-up the UI (so they would fail in
>>> Jenkins). I also noticed some flakiness, sometimes the scaladoc would be
>>> found, and other times it would be missing..
>>> let me know if I can do anything to help you with this. In the mid-term run,
>>> I'd like to push out a new beta beginning/middle of next week, and it would
>>> be great to have this in, so people can try it out.
>>> thanks,
>>> iulian
>>> --
>>> « Je déteste la montagne, ça cache le paysage »
>>> Alphonse Allais
> --
> « Je déteste la montagne, ça cache le paysage »
> Alphonse Allais

« Je déteste la montagne, ça cache le paysage »
Alphonse Allais