Play Framework community edition Scala IDE

Hi,

Quick question.

I have IntelliJ community edition Scala IDE.

Can I import libraries from the Play Framework into a scala class?

For example:

import play.api.libs.json._ 


Thanks

6 comments
Comment actions Permalink

You can use Play! Framework. What you will not have in IDE is templates/routes support. Built-in templates compilation support. Running Play! project support and so on.
But everything related to Scala editing itself will work, except that you need to recompile templates on every change to have proper error highlighting in Scala files. For compiling and running you can use command line.

To check whether you need Play! support in Ultimate, you can try 30 days trial, as it's free.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Thanks.

Last question

How do you correctly import the libary into a project? - It doesn't pick it up below.

Thanks

forum1.png

0
Comment actions Permalink

We don't have automatic way to detect library. So you most probably need to use SBT/Maven support somehow (in IDEA Ultimate you can just start Play project, so it's even simpler).
If you have library already correctly attached to your project, then you probably stuck into known bug, which requires File -> Invalidate caches or update to IDEA 14.0.3 and Scala plugin 1.3.1, which contains fix for that.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Ok - thank you.

I will try SBT/Maven - I'm a beginner.

Could you explain what you mean by 'library already correctly attached to your project' - how do you do this?

Thanks

0
Comment actions Permalink

Project settings -> Modules -> Your module -> Dependencies should contain library with play json.

If you are beginner, try to read this:
https://www.jetbrains.com/idea/help/play-framework-2-x.html (How to start Play! project in IDEA Ultimate)
https://www.jetbrains.com/idea/help/getting-started-with-sbt.html (Starting new SBT project int IDEA CE or Ultimate)

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.