This page is no longer maintained — Please continue to the home page at www.scala-lang.org

intellij vs eclipse (or rather, their scala plugins)

54 replies
Jeppe Nejsum Madsen
Joined: 2009-05-19,
User offline. Last seen 42 years 45 weeks ago.
Re: intellij vs eclipse (or rather, their scala plugins)

John Cheng writes:

[...]

> What I am getting at is that even with the sourcepath correctly set, I
> am not able to view the Scala source code for 3rd party libraries.

As I said, this works fine for me :-)

Not sure if this is specific to your lib/setup etc.

Here's an excerpt from my .classpath for a library that I know works:

/Jeppe

Jeppe Nejsum Madsen
Joined: 2009-05-19,
User offline. Last seen 42 years 45 weeks ago.
Re: intellij vs eclipse (or rather, their scala plugins)

John Cheng writes:

>>> On Fri, Aug 26, 2011 at 4:40 PM, John Cheng wrote:
>>>
>>>> Just noticed something about the Eclipse plugin that bothers me
>>>> slightly. I cannot view Scala source code by adding a "source
>>>> attachment". I don't always view the source code of the library I am
>>>> using, but when I do, IDE integration makes it very convenient.
>>
>> "View source" (mostly) works for me in Eclipse with the lift
>> source. Though sometimes I have to do a refresh on the workspace before
>> it works....
>>
>> Source jars are added automatically by my gradle build script
>>
>> /Jeppe
>>
>
> Perhaps I am doing something wrong. So you can open a Lift library
> under the "Referenced Libraries" tree (in Package Explorer) and see
> the Scala source code for Lift?

Yes

> Which version of Lift are you using?

2.4-M3, but this has been working for quite a while.

See other post with a .classpath example...

/Jeppe

Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: intellij vs eclipse (or rather, their scala plugins)
What version of the scala plugin are you using?

On Tue, Aug 30, 2011 at 1:20 AM, John Cheng <johnlicheng [at] gmail [dot] com> wrote:
On Mon, Aug 29, 2011 at 8:06 PM, Naftoli Gugenheim <naftoligug [at] gmail [dot] com> wrote:
> Wait, did you try opening the jar's properties and checking or setting the
> attached source location?
Yup. I did. The source path can be modified and it is pointing to a
jar file with  BarewordOperators.scala, CoreOperators.scala, and
Implicits.scala
https://lh3.googleusercontent.com/-4WiOiybxKpo/Tlxwhx5rY_I/AAAAAAAAAJc/Ghr7qKE-RdI/s912/Selection_010.png

> If your issue is that you would expect sbteclipse to specify the source path
> for you, then it's an sbteclipse question. For instance, the plugin for sbt
> 0.10 requires an extra parameter to add source information --- I think you
> do 'eclipse with-sources' or something (use tab completion to find out).

No, no, no. That's not what I am trying to get at. I think sbteclipse
did exactly what it advertised; I have no problems with it or the
eclipse plugin. What I am getting at is that even with the sourcepath
correctly set, I am not able to view the Scala source code for 3rd
party libraries.

> But again, I don't think it has anything to do with the scala plugin.

No. I don't find fault with the Eclipse scala plugin for this. I am
wondering if I am the only one with this problem (perhaps through user
error) or if it is just the state of things. I am saying it would
certainly be a nice feature. I would definitely try out an alternative
IDE+plugin that makes this possible.

John L. Cheng
Joined: 2011-07-30,
User offline. Last seen 42 years 45 weeks ago.
Re: intellij vs eclipse (or rather, their scala plugins)

HI everyone, a quick update here. I was able to use source attachments
with Lift code (thanks Jeppe) on a different machine. I've not had the
chance to research why the setup on my personal desktop is not working
as expected, but will report back when I do.

On Tue, Aug 30, 2011 at 6:07 PM, Naftoli Gugenheim wrote:
> What version of the scala plugin are you using?
>
> On Tue, Aug 30, 2011 at 1:20 AM, John Cheng wrote:
>>
>> On Mon, Aug 29, 2011 at 8:06 PM, Naftoli Gugenheim
>> wrote:
>> > Wait, did you try opening the jar's properties and checking or setting
>> > the
>> > attached source location?
>> Yup. I did. The source path can be modified and it is pointing to a
>> jar file with  BarewordOperators.scala, CoreOperators.scala, and
>> Implicits.scala
>>
>> https://lh3.googleusercontent.com/-4WiOiybxKpo/Tlxwhx5rY_I/AAAAAAAAAJc/G...
>>
>> > If your issue is that you would expect sbteclipse to specify the source
>> > path
>> > for you, then it's an sbteclipse question. For instance, the plugin for
>> > sbt
>> > 0.10 requires an extra parameter to add source information --- I think
>> > you
>> > do 'eclipse with-sources' or something (use tab completion to find out).
>>
>> No, no, no. That's not what I am trying to get at. I think sbteclipse
>> did exactly what it advertised; I have no problems with it or the
>> eclipse plugin. What I am getting at is that even with the sourcepath
>> correctly set, I am not able to view the Scala source code for 3rd
>> party libraries.
>>
>> > But again, I don't think it has anything to do with the scala plugin.
>>
>> No. I don't find fault with the Eclipse scala plugin for this. I am
>> wondering if I am the only one with this problem (perhaps through user
>> error) or if it is just the state of things. I am saying it would
>> certainly be a nice feature. I would definitely try out an alternative
>> IDE+plugin that makes this possible.
>
>

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland