Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA and PlayFramework modules

After a lot of good comment about IDEA, I decided to give it a try. I downloaded the Community Edition and would like to use it for PlayFramework development.

I have followed official documentation and some other information gathered around, but I have not succeeded completely. When using a project with differents (play) modules, the different classes are not found.

For example when using Secure module, IDEA keeps complaining about not finding Secure.class. It has to be a classpath issue. I tried to attach Java source & classes ($PLAY/modules/secure/) in module settings (F4), class is still not found. Did I miss something?

BTW, I have done a play dependencies and play idealize, which seems to add another module Secure into project in IDEA.

Thanks,

like image 762
i.am.michiel Avatar asked Aug 16 '11 19:08

i.am.michiel


People also ask

What are IntelliJ modules?

In IntelliJ IDEA, a module is an essential part of any project – it's created automatically together with a project. Projects can contain multiple modules – you can add new modules, group them, and unload the modules you don't need at the moment.

Where is modules in IntelliJ?

From the main menu, select File | Project Structure | Project Settings | Modules. Select the module for which you want to set an SDK and click Dependencies. If the necessary SDK is already defined in IntelliJ IDEA, select it from the Module SDK list.


1 Answers

The answer is to run the following:

play deps
play idealize

This forces the IDEA .iml project file to be refreshed with the updated class path entries for the new module (in this case Secure).

like image 60
David Collie Avatar answered Oct 17 '22 00:10

David Collie