Project: JDT
Bug 10694 [templates] need more flexible type mechanism
Reported: 2002-03-04 12:53:51 | Status: closed fixed

Templates provide some rudimentary support for indicating the type of a variable. If you use ${array}, for instance, the template tries to pick an array for that variable. But the built-in types are already insufficient, and I cannot imagine that we could possibly satisfy 80% of the users with only built in types. (For instance, I've written templates which cry for ${string} and ${iterator} types.) I think that the template support should provide some sort of generic mechanism for specifying the type of a variable. Something like ${java.lang.String string} or ${int index}. (20020215 build)

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/CompilationUnitCompletion.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/CompilationUnitContext.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/ElementTypeResolver.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContext.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContextType.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaFormatter.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaVariable.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/NameResolver.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/TypeVariableResolver.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/VarResolver.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplateEditorSourceViewerConfiguration.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariable.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/MultiVariableGuess.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/TemplateProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/preferences/TemplateVariableProcessor.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/preferences/TemplateVariableProposal.java