How to choose location for new class

If I, in a test, creates a class that doesn't exist (NonExistingClass xxx = new NonExistingClass) I will be prompted if I want to create that class. If I choose to create it then I never get the opportunity to choose in which source folder, test or src, I want to create it. I can only create it in t
he test folder. Is there a way to choose location so it will be created in the src folder?


Original message URL:

1 comment
Comment actions Permalink

After selecting the package in the "Create Class" dialog, and clicking "OK", you should get a "Choose Destination Directory" dialog that shows your test and source directories (see attached screenshot). This assumes you have the appropriate source directories identified in your project's structure configuration. For example, I have <project>/src/main/java set as a "source" directory and <project>/src/test/java as a "test source" directory.


Please sign in to leave a comment.