Greetings,
Below is the beginning of a discussion regarding Java annotation
editing in Eclipse. I wanted to bring your group into this
conversation so you could provide insight into how annotation editing
could/should be dealt with in a consistent fashion within Eclipse. I
would like to determine the best direction for this functionality
before entering a bugzilla enhancement. Details are below. Any
thoughts would be greatly appreciated.
Thanks,
Neil Hauge
WTP-JPA (Dali) Lead
Gunnar Wagenknecht wrote:
Neil Hauge wrote:
common issue of configuring annotated metadata in Eclipse.
I'm wondering if it would be worthwhile to investigate an API for
annotating members on an IJavaElement level. Right now Dali created a
lot of code to cover the AST manipulation behind a model. It's definitly
worthwhile to share this at a lower level.
However, from an UI point of view I feel that one central view for
manipulating annotations would be too generalized. IMHO all that is
needed would be a little more extensibility so that Java members in the
Java editor could provide there own Properties view input.
For example, the Java editor would activate the tabbed properties view.
Now other plug-ins should be able to contribute categories (tabs) to
that view depending on the selected element. This way Dali could provide
their special annotation editors to methods, fields or types if the type
is an entity.
As for the outline view, I'm not very confident that such a view is
needed. For example, the Dali Persistence Outline is pretty much just a
filtering and some different icons for existing Java members. So this
could be also probably solved by contributing dynamic filters to the
Java Outline and probably overlay icons. But then we would end up with
yet another set of overlay icons that a user has to learn and understand.
Cu, Gunnar
Hi guys,
As component leads for various projects that will need to support Java
EE 5, I wanted to get a dialog started regarding annotation editing for
Eclipse 3.3/WTP 2.0. The Dali JPA project has been dealing with this
issue for some time now, and I wanted to get everyone I can involved in
this discussion so we can try to devise a strategy for dealing with
this common issue of configuring annotated metadata in Eclipse.
One of the major issues is that Eclipse does not yet have a generic
annotation editing solution (outside of the Java source editor).
Rephrased, there is no common area for a user to go to edit annotations
via a UI (be it a basic properties table, or a rich UI). In the Dali
project, this has led us to create a custom "Persistence Properties
View" which is associated with the java source and a custom
"Persistence Outline", all of which is not very "Eclipse-ish" in terms
of platform integration, but seems required due to the lack of other
visible options when dealing with the JDT UI.
The current paradigm for supporting Java EE metadata in Eclipse is to
write an editor (or use the XML Editor) for the given XML Descriptor.
This allows for rich UI in the editor or in the Tabbed Properties if
desired. For some of the Java EE 5 technologies, such as EJB3, the
XML Descriptor has been left as a secondary option in favor of
annotations. In order to deal with this change, we need to find a way
to help users configure complex JEE 5 annotations in a consistent
fashion. Beyond EJB 3 - Web Services (JSR 181) and JAXB 2.0, among
many other non-standards based technologies, will need some sort of
annotation tooling support. Initially, I see a couple of different
options here:
1. Rely only on in-source annotation help via code complete and quick
fixes.
2. Push for the creation of a common annotation editing concept, which
could be in the form of an extension to the Properties view (basic
properties table or Tabbed Properties), or perhaps an additional editor
tab beside the java editor (tabbed editors), or maybe a completely new,
extensible annotation editing view.
It is very debatable as to what is best, but I think some sort of
common location for the related technologies to put their annotation
configuration will be necessary (if we are going to have UI for
annotation editing).
Since we are all in this annotation boat together, I figure it would be
good for us to collaborate on the solution. If we can agree that there
is a gap here, I will go ahead and enter an enhancement in bugzilla,
and we can continue the discussion there if that is more appropriate.
Thanks,
Neil Hauge
WTP-JPA (Dali) Lead
Oracle TopLink Tools
|