public AddTypeParameterProposal(ICompilationUnit targetCU, IBinding binding, CompilationUnit astRoot, String name, ITypeBinding[] bounds, int relevance) {
super("", targetCU, null, relevance, JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC));
Assert.isTrue(binding != null && Bindings.isDeclarationBinding(binding));
Assert.isTrue(binding instanceof IMethodBinding || binding instanceof ITypeBinding);
fBinding= binding;
fAstRoot= astRoot;
fTypeParamName= name;
fBounds= bounds;
if (binding instanceof IMethodBinding) {
String[] args= { BasicElementLabels.getJavaElementName(fTypeParamName), org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getMethodSignature((IMethodBinding) binding) };
setDisplayName(Messages.format(CorrectionMessages.AddTypeParameterProposal_method_label, args));
} else {
String[] args= { BasicElementLabels.getJavaElementName(fTypeParamName), org.eclipse.jdt.internal.ui.text.correction.ASTResolving.getTypeSignature((ITypeBinding) binding) };
setDisplayName(Messages.format(CorrectionMessages.AddTypeParameterProposal_type_label, args));
}
}