How to solve java file mapped to not java file type text
07:52 09 May 2019

I wanted to add a java class to a project, but I did a mistake and added it as a text file. Then, I removed it and tried to add it again as a java class, but unfortunately it doesn't work anymore. And I get the following error:

Unable to parse template "Class" Error message: ABC.java mapped to not java file type text

As I searched, I faced some solutions like this one but I can't find File Type under Editor or anything similar that I can change as suggested in the solution.

Any help would be appreciated.

PS: I am using IntelliJ 2018.3.4.

Thanks in advance,

java intellij-idea file-type