Bug 97442 [code manipulation] Smart paste adds import for type parameter
In RC1. Create class A: import java.util.List; public class A { class Counter<T, L extends List<T>> { private L _attribute; } } Now, copy the inner class "Counter", and paste it into empty class B: public class B { // PASTE HERE } imports are added: import L; import java.util.List; "import L" is wrong.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClipboardOperationAction.java
if (binding.getKind() == IBinding.METHOD) {
					buf.append("()"); 
				}
				staticsToImport.add(buf.toString());
			}
		}
		if (namesToImport.isEmpty() && staticsToImport.isEmpty()) {
			return null;
		}
		String[] typeImports= (String[]) namesToImport.toArray(new String[namesToImport.size()]);
		String[] staticImports= (String[]) staticsToImport.toArray(new String[staticsToImport.size()]);
		return new ClipboardData(inputElement, typeImports, staticImports);
	}
	private void doPasteWithImportsOperation() {
		ITextEditor editor= getTextEditor();
		IJavaElement inputElement= (IJavaElement) editor.getEditorInput().getAdapter(IJavaElement.class);
		Clipboard clipboard= new Clipboard(getDisplay());
		ClipboardData importsData= (ClipboardData) clipboard.getContents(fgTransferInstance);
		if (importsData != null && inputElement instanceof ICompilationUnit && !importsData.isFromSame(inputElement)) {
			
			IRewriteTarget target= editor != null ? (IRewriteTarget) editor.getAdapter(IRewriteTarget.class) : null;
			if (target != null) {
				target.beginCompoundChange();
			}
			try {
				fOperationTarget.doOperation(fOperationCode);
				addImports((ICompilationUnit) inputElement, importsData);
			} catch (CoreException e) {
				JavaPlugin.log(e);
			} finally {