Stopping IDEA trying to compile files with no extension
The subject says it all really, whenever I do a full build on a checked out
project IDEA will attempt to compile any files without a filename extension
as java and fail with a javac error message. In the shorter term I can just
rename these files it .txt, but then it assumes I'm making changes to the
project that need to be committed.
I don't really want to do this, just stop IDEA from compiling non-java files..
any ideas? a forum search didn't really help. I've tried adding (?*.) as
a resource but it hasn't worked?
- Richard
请先登录再写评论。
Just add a blank file mapping for the files with no extensions. The
easiest way is to double click one of those files, idea will ask what
the file type is, choose txt, and then click OK. From then on IDEA will
not compile those files since they are of txt type and those are
excluded in the compile settings for the IDE.
hth
R
Thanks for the reply, but I still can't get this to work, when I double-click
on these files I don't get a prompt asking for a type, they just appear in
an editor with any matching Java keywords highlighted. They appear as little
'J' icons with a stop symbol over them in the project view - it still thinks
they're Java files..
I've tried adding a new type to the text files under the file types con fig
dialog, but it wont let me associate an empty extension.
- Richard
Sigh.. Never mind I've just found an empty extension associated with the
java file types,
removing that should do the trick.. wonder where it came from?
- Richard
You should remove the blank entry from Settings->File Types. I think you
accidentally double-clicked a file without an extension and then chose the Java
type to assign to it.
Richard Osbaldeston wrote: