Bug 47315 Add quick fix for remove an unused @ Javadoc tag. [quick fix]
The 3.0.m5 Javadoc warnings are *great* and will improve our Javadocs. Could we hae quick fixes for the new warnings when possible. For example: when a @throws is no longer valid, a quick fix to remove the comment would be great. Version 3.0.m5.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java
}
	
	
	private static void insertThrowsTag(Javadoc javadoc, ListRewrite rewriter, TagElement newElement, ASTNode node) {
		Set previousArgs= new HashSet();
		List list= ((MethodDeclaration) javadoc.getParent()).thrownExceptions();
		for (int i= 0; i < list.size() && node != list.get(i); i++) {
			Name curr= (Name) list.get(i);
			previousArgs.add(ASTNodes.getSimpleNameIdentifier(curr));
		}
		List tags= rewriter.getRewrittenList();
		
		ASTNode before= null;
		for (int i= tags.size() - 1; i >= 0; i--) {
			TagElement curr= (TagElement) tags.get(i);
			String tagName= curr.getTagName();
			if ("@throws".equals(tagName) || "@exception".equals(tagName)) {  
				String arg= getArgument(curr);
				if (arg != null && previousArgs.contains(arg)) {
					rewriter.insertAfter(newElement, curr, null);
					return;
				}
				before= curr;
			}
		}
		if (before != null) {
			rewriter.insertBefore(newElement, before, null);
		} else {
			rewriter.insertLast(newElement, null);
		}