Summary: | [code templates] provide a since tag argument resolver | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> |
Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | markus.kell.r |
Version: | 3.5 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 301337 |
Description
Dani Megert
2008-09-03 06:38:59 EDT
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. |