Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ: Display .java extension in Packages View

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).

My problem of the viewer

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!

like image 239
kon Avatar asked Jun 15 '17 13:06

kon


People also ask

How do I show file extensions in IntelliJ?

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.

How do I check for Java extensions?

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.

How do I get package view in IntelliJ?

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.

How do I change Project structure view in IntelliJ?

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.


1 Answers

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)

Here is the view

like image 193
mahfuj asif Avatar answered Sep 19 '22 13:09

mahfuj asif