Using mixed Java and Scala source - where to start?
I have the scala plug in - looking nice !
I wanted to get some pointers on what I can and can't do regarding mixed Java and Scala source.
What I would like to do is take an existing java app, and (ideally) migrate it to scala source incrementally (in the one project). Can I do this? What are the limitations with mixing the source (maven is the build system so I guess I will need to have it use scalac instead of javac for source compiling - as scalac can certainly do this).
Any advice much appreciated, its looking really promising.
请先登录再写评论。
You can have the dependencies both ways as far as compilation is concerned (we launch scalac externally, giving it the full source/classpath). However when highlighting java code that uses scala you'll have lots of red code. The projections of scala into bytecode that should be picked when highlighting java are not trivial sometimes, so in general this won't always work. However we will be understanding the common cases in the future.
Apart from this there are no limitations that I'm aware of.
Eugene.
Thanks Eugene.
I will do some more experimenting (been having other unrelated intelliJ issues - I need to clean things out and start again).
If I find specific issues - should I log a bug/issue or post here? What works best (I am new here) for helping the team out?
Hello, Michael.
The best way to let us know about some issue in Scala plugin is to create appropriate entry in our bugtracker:
http://jetbrains.net/jira/browse/SCL
With best regards,
Ilya