Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Q about relationships between various java language element models in jdt.core




I'm looking into the possibility of an eclipse plugin to support C#, so I'm
trying to understand how JDT does all the stuff it does.  One thing that's
confusing me is the number of different (but similar) object models for
representing Java language elements.  For instance if you take Java fields,
there is:

  org.eclipse.jdt.core.IField

which is implemented by
  org.eclipse.jdt.internal.core.BinaryField   and
  org.eclipse.jdt.internal.core.SourceField

then you have

  org.eclipse.jdt.internal.compiler.ast.FieldDeclaration

as well as

  org.eclipse.jdt.core.dom.FieldDeclaration

finally there is

  org.eclipse.jdt.core.jdom.IDOMField

which is implemented by
 org.eclipse.jdt.internal.core.jdom.DOMField


Can anyone help me answer these questions:

1) are all 4 of these object models considered necessary and good?   If you
were starting from scratch on support for a new language would you have all
4?

2) What are the key relationships between the object models?  Are there
places where you walk a tree of one type to build a tree of another?  I see
that when the parser runs it creates nodes of the classes in
org.eclipse.jdt.internal.compiler.ast, so when do trees of the other types
get created?

3) Are the org.eclipse.jdt.internal.compiler.ast classes meant to be more a
model of the syntactic structure of the file, while the other models are
meant to represent the semantic information?  In other words was it deemed
useful (or necessary) to have a more syntactic / file-oriented model as
well as a more semantic model to do refactoring type stuff, or could they
be combined into one?  Or are the key distinctions between these object
models something else besides syntax vs. semantics?

4) Are there any newsgroups, mailing-lists, or documents that are
specifically for people trying to produce org.eclipse.Xdt - for languages X
that haven't been hosted on eclipse yet?


thanks in advance,

Chris



Back to the top