40

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!

3
  • 5
    There is no such an option. Commented Jun 15, 2017 at 15:23
  • 4
    I believe it's by design not possible. The circle icon represents a *.java file which has been compiled into a *.class file. If you create for example an empty Dummy.java file it will be shown as Dummy.java in the explorer view. Commented Jun 16, 2017 at 7:09
  • 5
    The Packages view shows classes, not files. Names of classes do not have extensions. Commented Mar 26, 2019 at 15:13

3 Answers 3

2

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

Sign up to request clarification or add additional context in comments.

Comments

-5

Switching "Packages" view to "Project Files" will show extensions:

Project Files

4 Comments

Not on my machine. IntelliJ IDEA 2018.2.4 (Ultimate Edition)
Not on my machine either. Ultimate 2018.3
Not on my machine either. IntelliJ IDEA 2019.2.3 (Ultimate Edition)
Not on my machine either. IntelliJ IDEA 2023.3.4 (Community Edition)
-8

An interface is written in a file with a .java extension, with the name of the interface matching the name of the file.

https://www.tutorialspoint.com/java/java_interfaces.htm

1 Comment

This is not what I mean. I don´t want to change/switch the view. I just want it to show .java in the Packages explorer. To maybe make it more clear: It says sample.fxml but not Main.java. I want it to show the file extension.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.