Hi Sean
On Tuesday 12 May 2015 22.57:43 Sean Wolfe wrote:
> Is it possible to use cmd-shift-O to pull Java imports for a Scala file?
Just to make sure I'm getting this right: you have a Scala source file and want
to use Organize Imports to import some Java types?
> Context: I'm working with a Java-based game framework called Libgdx. I
> think the .classpath file has all the necessary dependencies. However, when
> I press cmd-shift-O I get no response. It's like I didn't even press the
> keys.
Is there something in Eclipse's error log?
> Any thoughts? Could this be based on the fact that the libgdx project uses
> Gradle for its dependencies, and now I'm using SBT when converted to Scala?
This shouldn't make any difference, Organize Imports doesn't care where a class
comes from, as long as it's part of the classpath.
Cheers
Mirko
Hi Sean
Is there something in Eclipse's error log?
--
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/483c2024-2a7d-4f72-9e8b-3c4dc53d07a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Scala IDE has its own log in "Scala > Open the log". Ensure that you set the log level to debug in "Preferences > Scala > Logging".
Aha! I nearly have it working now. Had to do a few things:
* add my src directories as entries in .classpath* add external jarfile to my build path.
Currently, Ctrl-Shift-O is triggering the organize -- and eclipse is throwing an exception 'an unhandled exception occurred while creating a change object' followed by the warning 'There are errors in the file. Organizing Imports might produce incorrect results'
I'm seeing this in the debug info. What does 'missing unit' mean in this context?
------------------
2015-05-13 17:27:38,712 INFO [main] - ScalaPresentationCompiler - Missing unit for file /home/sean/stuffs/android-scala/scratchpad/libgdx_scalaide/core/src/main/scala/Start.scala when retrieving errors. Errors will not be shown in this file2015-05-13 17:27:38,712 INFO [main] - ScalaPresentationCompiler - Map(/LibgdxScalaide/core/src/main/scala/Start.scala -> Start.scala)------------------
Thanks!
--
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/e7089745-1bd4-49a2-9472-bbf5d1837326%40googlegroups.com.