Creating or jumping to a resource folder for a given class
I often want to create a resource file for a class that should be in the same folder structure as the file. For example I have
src\test\java\com\xyz\converter\SomeClass.java
and for that I want to create a file
src\test\resources\com\xyz\converter\someFile.json
If that folder doesn't exist yet I copy the relative path of the java file, remove everything before "src", navigate to the resources folder, create a new folder and paste the path.
I wonder if there is some easier way to do that? Ideal would be an option "Jump to resource folder" which would do the same for me: Creare the folder if needed and then navigate there. Is there such an option? https://www.jetbrains.com/help/idea/creating-resources.html seems to do something similar but I don't develop for android.
请先登录再写评论。
You can switch to Packages view in project tool window and create new file from the needed package:
To quickly navigate to Project tool window you can use Select in Project View action.
This works maybe if the resource folder already exists. But if there is no folder structure in resources then it is not created and the new txt file is created next to the java files. :-(
@...
You can submit a new feature request to our issue tracker describing for what files and projects you would like to have this functionality, and how you would like it to behave exactly.