Community
Participate
Working Groups
Build Identifier: N/A Hello, Adding a template variable "version" that can be used in @since javadoc tags can be quite handy for API documentation. This version can default to the plugin / fragment etc. version that can be obtained from the manifest Reproducible: Always
Markus, does JDT use org.eclipse.core.variables for variables in code templates? Are code template variables extensible?
No, the variables for code templates are currently hardcoded in org.eclipse.jdt.internal.corext.template.java.CodeTemplateContextType. We already have bug 246067 for this request, but we never decided how exactly we want to implement this on the JDT side. The feature would also be useful in non-plug-in projects, but we need to find a way to set a default version that can be overridden by PDE if you can resolve it from the manifest.
Darin, can you compute the right version fast enough that we can use this in code templates? The templates are e.g. used in code assist, so they need to be quick. I know you already have the quick fix on the "missing @since tag" problem which does about the same, but I saw that the marker for that problem already contains the version, so it's probably not computed on-the-fly there.
(In reply to comment #3) > Darin, can you compute the right version fast enough that we can use this in > code templates? The templates are e.g. used in code assist, so they need to be > quick. > I know you already have the quick fix on the "missing @since tag" problem which > does about the same, but I saw that the marker for that problem already > contains the version, so it's probably not computed on-the-fly there. PDE/API tools has the version information readily available. So, yes, it could be computed fast enough for templates.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Please remove the stalebug flag, if this issue is still relevant and can be reproduced on the latest release.