Reputation: 2591
I created a maven project, and my hierarchy is :
MyPro:
.ideas
src
-main
-java
-mypackage
-MyClass.java
-test
-java
-mypackage
- (PLACEHOLDER)
When I try to create MyClassTest.java at PLACEHOLDER i.e. in test/java/mypackage, I got unable to parse template class, cannot create class-file
.
But if I create TestMyClass.java file, it works. I wonder why is that?
Upvotes: 2
Views: 4323
Reputation: 18869
Do you have MyClassTest.java
or something similar listed under:
Settings → Editor → File Types→ Text files ?
If so, try removing that pattern and check if you can create the class.
I was able to reproduce this error in a standard maven project, after adding the following file type:
And then trying to create the MyClassTest.java
:
And after removing the file type there were no problems creating the Test class.
Upvotes: 8