I am pretty new to IntelliJ and I can't find an option to display all file extension in the packages view (in my case .java).
As you can see on the sceenshot it just says "Main" or "Controller" on the left package explorer view.
Is there any option to make it display Main.Java and Controller.java (like in the editor view on the right side)?
Thanks a lot!
Press Ctrl+Alt+S to open the IDE settings and select Editor | File Types. Click Associate File Types with IntelliJ IDEA and select the file extensions you want to open with the IDE.
String fileName = "Test. java"; String extension = Files. getFileExtension(fileName); And, also the Apache Commons IO provides the FilenameUtils class provides the getExtension method to get the extension of the file.
Click on the gear icon at the top right on the package view, and make sure that "Flatten Packages" and "Compact empty middle packages" are unchecked. Show activity on this post. This screen shot taken from IntelliJ IDEA 2017. Most of the time the answer will be same on every Intellij IDE.
To change settings of a module that hosts the file you are currently editing, just press Alt+F1, 7 or open the View menu, select Select In and click Project Structure. IntelliJ IDEA will open the Project Structure dialog and jump to the required module.
File extension can not be shown in package view(or any other). Rather you can try showing file extension in editors tab. To do this go to File -> Editor -> General -> Editors Tab . Here select placement
anything other than none, tick Show file extension . (version IntelliJ IDEA 2020.1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With