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
/* (non-Javadoc)
	 * @see org.eclipse.jface.action.IAction#run()
	 */
	public void run() {
		if (fOperationCode == -1 || fOperationTarget == null)
			return;
		ITextEditor editor= getTextEditor();
		if (editor == null)
			return;
		if (!isReadOnlyOperation() && !validateEditorInputState())
			return;
		BusyIndicator.showWhile(getDisplay(), new Runnable() {
			public void run() {
				internalDoOperation();
			}
		});
	}
	private Shell getShell() {
		ITextEditor editor= getTextEditor();
		if (editor != null) {
			IWorkbenchPartSite site= editor.getSite();
			Shell shell= site.getShell();
			if (shell != null && !shell.isDisposed()) {
				return shell;
			}
		}
		return null;
	}
	private Display getDisplay() {
		Shell shell= getShell();