Bug 82311 [correction] Add '@throws' tag does not insert the exception type name
Version: 3.1.0 Build id: 200412210800 When you have javadoc compiler checks turned on and have a method like the following the quick fix to add a throws tag does not insert the name of the exception. The add all missing tags quick fix does add the exception type so the information should be available. I did figure out that the change was simple, but wasn't really sure how to create a copy of an existing ast node (the name of the exception is in "missingNode"). JavadocTagsSubProcessor.AddMissingJavadocTagProposal#insertMissingJavadocTag: after creating the throws tag ( newTag.setTagName(TagElement.TAG_THROWS) ) a simple name has to be added ( newTag.fragments().add(<SimpleNameNode>) )
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java
Javadoc javadoc= bodyDeclaration.getJavadoc();
	 	if (javadoc == null) {
	 		return;
	 	}
	 	
	 	String label;
	 	StructuralPropertyDescriptor location= node.getLocationInParent();
	 	if (location == SingleVariableDeclaration.NAME_PROPERTY) {
	 		label= CorrectionMessages.getString("JavadocTagsSubProcessor.addjavadoc.paramtag.description"); 
	 		if (node.getParent().getLocationInParent() != MethodDeclaration.PARAMETERS_PROPERTY) {
	 			return; 
	 		}
	 	} else if (location == TypeParameter.NAME_PROPERTY) {
	 		label= CorrectionMessages.getString("JavadocTagsSubProcessor.addjavadoc.paramtag.description"); 
	 		StructuralPropertyDescriptor parentLocation= node.getParent().getLocationInParent();
	 		if (parentLocation != MethodDeclaration.TYPE_PARAMETERS_PROPERTY && parentLocation != TypeDeclaration.TYPE_PARAMETERS_PROPERTY) {
	 			return; 
	 		}
	 	} else if (location == MethodDeclaration.RETURN_TYPE2_PROPERTY) {
	 		label= CorrectionMessages.getString("JavadocTagsSubProcessor.addjavadoc.returntag.description"); 
	 	} else if (location == MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY) {
	 		label= CorrectionMessages.getString("JavadocTagsSubProcessor.addjavadoc.throwstag.description"); 
	 	} else {
	 		return;
	 	}
	 	ASTRewriteCorrectionProposal proposal= new AddMissingJavadocTagProposal(label, context.getCompilationUnit(), bodyDeclaration, node, 1); 
	 	proposals.add(proposal);
	 	
	 	String label2= CorrectionMessages.getString("JavadocTagsSubProcessor.addjavadoc.allmissing.description"); 
	 	ASTRewriteCorrectionProposal addAllMissing= new AddAllMissingJavadocTagsProposal(label2, context.getCompilationUnit(), bodyDeclaration, 5);