Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » "java" sources file extensions hardcoded
"java" sources file extensions hardcoded [message #583345] Thu, 30 September 2004 12:45
Edoardo Comar is currently offline Edoardo ComarFriend
Messages: 28
Registered: July 2009
Junior Member
Hi All,

would an enhancement request to JDT about opening up the set of file
extensions that the JDT editor consides as "java" sources get some
consideration ?

By looking in the JDT source code there semem to be plenty of calls to
org.eclipse.jdt.internal.compiler.util.Util.isJavaFileName(. ..)
where the expected file suffix is ".java" and it does not seem possible
to change that.

I was exploring a java editor customization so that say ".myjava" files,
containing only pure java sources would be opened by a "MyJavaEditor" (*).

I encountered similar problems to AJDT's editor when using ".aj" iles
instaed of ".java" files: a lot of the JDT niceties (it's reason d'etre)
get lost.

I know that AJDT's goals are : <quote>to bring the AJDT experience much
closer to that of Eclipse's JDT, including things like code completion,
formatting, and organise imports</quote>

In the case of AJDT in its current 1.1.12 form, if you write a plain
class inside an "aj" file, w.r.t. to the same class written in a "java"
file:
- no folding capability
- no enhanced syntax highlighting (eg field declarations, statics etc)
- no source menu actions (eg no refactorings)
- some code completions don't work - eg in the body of a class, type
"to" to override toString(..)
- etc

But, if you rename the "aj" file extension to "java" and force it to
open with the AspectJ editor, i.e. the same editor as before (!!!) those
problems all GO AWAY !

No surprise that's a preference to use aj/java as the default extension
for aspect source files.

so can the JDT get the file extensions recognized as java from an
extension point ?

Edo



PS - I appreciate that the JDT's CompilationUnitEditor is an internal
class ... so what ... both the VE project and the AJDT project extend it!


(*) MyJava sources could contain a mix of user code and generated code -
the custrom editor could provide some guards against messing up the
generated stuff.
Previous Topic:Plugin and Fragment with AspectJ
Next Topic:"java" sources file extensions hardcoded
Goto Forum:
  


Current Time: Thu Apr 25 16:17:02 GMT 2024

Powered by FUDForum. Page generated in 0.03104 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top