Community
Participate
Working Groups
I20080902-0800. A since tag argument resolver would allow us to specify the @since tag in our code templates in a generic way. We could get the tag from the bundle manifest if available or from an additional code template (so we only need to change it once per project).
I really like the idea. One thing which came to my mind was regarding non-plugin projects. If nothing is specified the resolver could take a look at the package-info.java if it exists. Not sure about the convention used there at the moment.
The javadoc @since tag would be the one to choose: http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#packagecomment
(In reply to comment #1) Nah, the @since in package-info.java should tell when the package was added. It should not be increased with every release of the package. The variable should rather resolve to the empty string in case no version could be found. E.g. "@since ${version}" would then resolve to "@since " (which would then have to be completed by the user).
Could be implemented like this: - add a new context type "org.eclipse.jdt.ui.default_since_tag_context" - add a code template for the default since tag - add a new variable "${since_tag}" that is available in all code template comment contexts - add a registryId to the registry created in JavaPlugin#getCodeTemplateContextRegistry(), so that PDE can contribute a resolver for the "${since_tag}" variable - after creating the registry, check whether it contains a resolver for "${since_tag}", and if it doesn't, add a resolver that inserts the template for the default since tag.