Reputation: 1952
I have Maven project and when I want to create new class, it isn't in an offer. There is only new File
. Also packages aren't available but instead of them, there are directories.
What I should turn on?
Edit:
I have IDEA 12, here is screenshots from different projects.
Project 1 - correct:
Project 2 - incorrect
Upvotes: 2
Views: 1850
Reputation: 11
If you set mark the folder as source root, the color is turned to be blue and now you can right click the folder to add your packages. Click the link to see the snapshot. https://i.sstatic.net/CTFS0.jpg
Upvotes: 1
Reputation: 93868
New/Class and New/Package actions are only available within source roots. If you have a project folder selected, or some subfolder that is not within a src root, you won't be able to create classes there
Upvotes: 4
Reputation: 309008
Wrong. IntelliJ 12 does allow you create new classes. Under File->New you'll see Java Class, Package, all the usual suspects.
I don't see what Maven has to do with this at all.
Upvotes: 0