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 (shell != null) {
			return shell.getDisplay();
		}
		return null;
	}
	protected final void internalDoOperation() {
		if (PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_IMPORTS_ON_PASTE)) {
			if (fOperationCode == ITextOperationTarget.PASTE) {
				doPasteWithImportsOperation();
			} else {
				doCutCopyWithImportsOperation();
			}
		} else {
			fOperationTarget.doOperation(fOperationCode);
		}
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ui.texteditor.IUpdate#update()
	 */
	public void update() {
		super.update();
		if (!isReadOnlyOperation() && !canModifyEditor()) {
			setEnabled(false);
			return;
		}
		ITextEditor editor= getTextEditor();
		if (fOperationTarget == null && editor!= null && fOperationCode != -1)
			fOperationTarget= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
		boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode));
		setEnabled(isEnabled);