Having some problems with ScalaIDE...

瀏覽次數:71 次
跳到第一則未讀訊息

Eax Melanhovich

未讀,
2015年6月14日 下午1:58:212015/6/14
收件者:scala-i...@googlegroups.com
Hello.

Recently I installed Scala IDE 4.1.0 on Ubuntu Linux 14.04 LTS with
Scala 2.11.6 and Oracle Java 8. There were a number of problems, but
most of them I managed to solve with help of Google. Could you please
help me with a few that have left?

1. Does Scala IDE support sbt multi-projects? In our project a
'backend' sub-project depends on 'commons' sub-project. When classes
and methods defined in 'commons' are used from 'backend' ScalaIDE
highlights corresponding lines like this:

http://imagizer.imageshack.com/img661/9015/4pgtqq.png

In the same project ScalaTest plugin doesn't run any tests. Maybe there
is some workaround for this?

2. In simple Akka-based project ScalaIDE does not show ScalaDoc for
some methods, e.g. system.actorOf:

http://i.imgur.com/2yzPfHj.png

Project was generated using `sbt 'eclipse with-source=true'` command
and all source files are present. Maybe in this case instead of F2 I
should use some other hotkey?

3. It seems that Ctr+Shift+Space doesn't work at all. Do I right
understand that it suppose to give a hint regarding method arguments,
like Ctr+P in IntelliJ IDEA? Or there is another hotkey for this?


--
Best regards,
Eax Melanhovich
http://eax.me/

Simon Schäfer

未讀,
2015年6月14日 下午6:41:062015/6/14
收件者:scala-i...@googlegroups.com


On 06/14/2015 04:54 PM, Eax Melanhovich wrote:
> Hello.
>
> Recently I installed Scala IDE 4.1.0 on Ubuntu Linux 14.04 LTS with
> Scala 2.11.6 and Oracle Java 8. There were a number of problems, but
> most of them I managed to solve with help of Google. Could you please
> help me with a few that have left?
>
> 1. Does Scala IDE support sbt multi-projects?
Sure it does. If it doesn't for you, there is probably a configuration
error in your Eclipse projects. Maybe sbteclipse can't handle your
specific project layout.
> In our project a
> 'backend' sub-project depends on 'commons' sub-project. When classes
> and methods defined in 'commons' are used from 'backend' ScalaIDE
> highlights corresponding lines like this:
When you look at the build path of "backend" (right click on project >
properties > Java build path) the "commons" project should be added in
the "Projects" tab.
>
> http://imagizer.imageshack.com/img661/9015/4pgtqq.png
>
> In the same project ScalaTest plugin doesn't run any tests. Maybe there
> is some workaround for this?
>
> 2. In simple Akka-based project ScalaIDE does not show ScalaDoc for
> some methods, e.g. system.actorOf:
>
> http://i.imgur.com/2yzPfHj.png
>
> Project was generated using `sbt 'eclipse with-source=true'` command
> and all source files are present. Maybe in this case instead of F2 I
> should use some other hotkey?
You can enable debug logging in Preferences > Scala > Logging. You
should then get more output in the log that hopefully explains why no
Scaladoc is shown.
>
> 3. It seems that Ctr+Shift+Space doesn't work at all. Do I right
> understand that it suppose to give a hint regarding method arguments,
> like Ctr+P in IntelliJ IDEA? Or there is another hotkey for this?
>
>
I understand what you mean but this feature is not supported by the
Scala editor (actually I don't even know if it is supported by the Java
editor).

Eax Melanhovich

未讀,
2015年6月15日 凌晨4:26:192015/6/15
收件者:Simon Schäfer、scala-i...@googlegroups.com
Simon, thanks for your reply.

>> You can enable debug logging in Preferences > Scala > Logging. You
>> should then get more output in the log that hopefully explains why
>> no Scaladoc is shown.

Strange thing just happened. After ScalaIDE restart F2 works just fine.
I probably generated Eclipse project without 'with-source=true' flag at
first and didn't reimport a project after fixing that. So only one
issue has left, regarding multi-projects.

>> When you look at the build path of "backend" (right click on project
>>> properties > Java build path) the "commons" project should be
>>> added in the "Projects" tab.

It is added http://i.imgur.com/ncgNiXq.png

Our project layout is like this:

http://paste.ubuntu.com/11718274/

Content of project/Build.scala:

http://paste.ubuntu.com/11718289/

Content of project/plugins.sbt:

http://paste.ubuntu.com/11718295/

If there is any other information that could help to diagnose a problem
I would be happy to provide it.

Simon Schäfer

未讀,
2015年6月15日 凌晨4:35:432015/6/15
收件者:scala-i...@googlegroups.com


On 06/15/2015 10:22 AM, Eax Melanhovich wrote:
> If there is any other information that could help to diagnose a problem
> I would be happy to provide it.
You can't make the sources of the project available to us, can you?
Instead, would you please create a standalone sbt project, with the sbt
build you posted and create an import declaration in "backend" that
imports a type from the "common" project and that produces a compiler error?

Eax Melanhovich

未讀,
2015年6月15日 清晨5:16:462015/6/15
收件者:Simon Schäfer、scala-i...@googlegroups.com
No problem, here is a simple project which reproduces an issue:

https://dl.dropboxusercontent.com/u/19923518/temp/server_eclipse.tgz

Screenshot included :)

Simon Schäfer

未讀,
2015年6月15日 清晨7:35:262015/6/15
收件者:scala-i...@googlegroups.com


On 06/15/2015 11:13 AM, Eax Melanhovich wrote:
> No problem, here is a simple project which reproduces an issue:
>
> https://dl.dropboxusercontent.com/u/19923518/temp/server_eclipse.tgz
>
> Screenshot included :)
After running `sbt eclipse` and then importing the projects in Eclipse,
everything worked as expected. You can try to clean the project, maybe
that helps. If that doesn't help you should have a look at the log (with
debug logging enabled). It should show which classpath is used to build
the project.

Eax Melanhovich

未讀,
2015年6月15日 上午8:15:032015/6/15
收件者:Simon Schäfer、scala-i...@googlegroups.com
OK, here is a complete scala-ide.log after deleting projects
from ScalaIDE, running:

./sbt clean
./sbt 'eclipse with-source=true'

And re-importing projects:

http://paste.ubuntu.com/11719102/

On Mon, 15 Jun 2015 13:35:24 +0200
Simon Schäfer <ma...@antoras.de> wrote:

>
>
> On 06/15/2015 11:13 AM, Eax Melanhovich wrote:
> > No problem, here is a simple project which reproduces an issue:
> >
> > https://dl.dropboxusercontent.com/u/19923518/temp/server_eclipse.tgz
> >
> > Screenshot included :)
> After running `sbt eclipse` and then importing the projects in
> Eclipse, everything worked as expected. You can try to clean the
> project, maybe that helps. If that doesn't help you should have a
> look at the log (with debug logging enabled). It should show which
> classpath is used to build the project.
> >
> > On Mon, 15 Jun 2015 10:35:40 +0200
> > Simon Schäfer <ma...@antoras.de> wrote:
> >
> >>
> >> On 06/15/2015 10:22 AM, Eax Melanhovich wrote:
> >>> If there is any other information that could help to diagnose a
> >>> problem I would be happy to provide it.
> >> You can't make the sources of the project available to us, can you?
> >> Instead, would you please create a standalone sbt project, with the
> >> sbt build you posted and create an import declaration in "backend"
> >> that imports a type from the "common" project and that produces a
> >> compiler error?
> >>
> >
> >
>



Eax Melanhovich

未讀,
2015年6月15日 上午9:01:442015/6/15
收件者:Simon Schäfer、scala-i...@googlegroups.com
Well, I discovered that manually building 'commons' project from
ScalaIDE (Rigth click in projects three -> Build Project) solves a
problem.

Thanks a lot!

iulian dragos

未讀,
2015年6月15日 中午12:36:342015/6/15
收件者:scala-i...@googlegroups.com、Simon Schäfer
One thing to keep in mind is that the presentation compiler only looks at bytecode for dependent projects. Therefore, you need to build your workspace once (usually, Build Automatically takes care of that).

--
You received this message because you are subscribed to the Google Groups "Scala IDE User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-user/20150615155821.11f58750%40fujitsu.
For more options, visit https://groups.google.com/d/optout.



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
回覆所有人
回覆作者
轉寄
0 則新訊息