Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-releng-dev] improved checking for internal references

Douglas Pollock wrote on 02/17/2005 02:55:50 PM:

> On Thursday February 17 2005 02:25 pm, Steven Wasleski wrote:
> > An idea that has been bouncing around in my head for a little while is that
> > we could start with the component.xml because that is what we have the
> > tools for now.  At a later date when we start targeting Java 5 VMs instead
> > of Java 1.4 VMs, we could create the annotation types we need and write a
> > tool to do a one time injection from the component.xml files into the
> > source.  If needed we could write a build time script that would do the
> > reverse operation.
>
> Part of my objection is that I believe generating this "component.xml" file
> will take a lot of time and be error prone.  Why not write the tool first?
>
> Java 5 Annotations might not work well for Platform/UI.  Please see Bug 80053
> ("https://bugs.eclipse.org/bugs/show_bug.cgi?id=80053").
>

Good tooling will be desirable for what ever annotation method(s) we choose or we run the risk of annotation and intention getting out of sync.  I think we agree that a single source for the information is best now or not so long from now.

As for Java 5 Annotations vs Javadoc, there are good arguments both ways and the RCP point from your comment and the bug are well taken.  However, it might be possible to use these annotations even in this case.  The Java 5 Annotations provide for three different retention policies for different annotation types (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/RetentionPolicy.html).  One of them directs the compiler to throw them away.  This essentially makes them fancy Javadoc comments as far as I can tell, but perhaps we could have non-RCP types use a longer retention policy.

I think I could be convinced either way on the Java 5 Annotations vs Javadoc debate.  I think the decisive point would be which one could be more easily and completely tooled, both for authoring annotations for an api and enforcing them as others write code that uses an api.

Thanks,
Steve


Back to the top