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
'scala.tools.eclipse.ui', and code that implements core functionality
is in scala.tools.eclipse.completions. I believe it's easy to find
your way around those classes.

cheers,
iulian

On Sat, Jul 16, 2011 at 5:46 PM, iulian dragos <jagu...@gmail.com> wrote:
> On Sat, Jul 16, 2011 at 11:01 AM, Daniel Ratiu <rat...@googlemail.com> 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: org.scala-ide.build/build-ide-trunk.sh)
>
> 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:
>
> https://www.assembla.com/code/scala-ide/git/changesets/fd367cffb067632d2ee0d877f6e7bb79b13cb013
>
> 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:
>> http://download.scala-ide.org/nightly-update-wip-experiment-trunk
>>
>> 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 <jagua...@gmail.com> 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 'scala.tools.eclipse.ui' 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