Non *.java files as java acociation in Eclipse

Non *.java files as java acociation in Eclipse

Post by sarson » Thu, 03 Aug 2006 18:28:53


Hi,

I'm using Eclipse and in project, that I'm working with use *.jcx and
*.jws files, that are in fact regular *.java files. But I don't know,
how to tell Eclipse to work with them as with regular java files (so
that it provide syntax highlight, etc.). Can somebody help me?

Thank you,

Jindra
 
 
 

Non *.java files as java acociation in Eclipse

Post by Roland de » Thu, 03 Aug 2006 19:34:46


Window > Preferences > General > Editors > File Associations
Use the upper Add... button to add a file associations for *.jcx.
Then select *.jcx in the list and hit the lower Add... button to
associate the Java Editor with it.
Repeat for other files.
--
Regards,

Roland

 
 
 

Non *.java files as java acociation in Eclipse

Post by sarson » Thu, 03 Aug 2006 21:02:50

Hi Roland,

thank you for reply - this helps with editors, thank you. But there is
still problem, that for example package explorer didn't think, this is
Java file and didn't work with this as a Java class. For example, it
doesn't compile automaticaly and I cannot find it using Class browser
etc. Is there any sollution to tell Eclipse, that is shlould handle
this files as regular Java?

Thank you,

Jindra
 
 
 

Non *.java files as java acociation in Eclipse

Post by Roland de » Thu, 03 Aug 2006 21:48:43


I don't think that is possible with Eclipse (at least not without some
custom written plugin). Couldn't find it mentioned in the JLS (Java
Language Specification), but the commandline compiler (javac) mandates
that Java source files have .java suffixes (see
< http://www.yqcomputer.com/ ;).
Eclipse probably follows this convention.

What is the reason that you cannot just have *.java file names?
--
Regards,

Roland
 
 
 

Non *.java files as java acociation in Eclipse

Post by sarson » Thu, 03 Aug 2006 22:41:55

There are generated files from Bea workshop (jws files) and also other
generated javas from bea tools. Those are normal java files, only the
extension is other.

Jindra