Bug 70077 [typing] Copy/paste doesn't work occasionally
Hi. When I do the copying/pasting, something seems strange: I'm editing the Java source code, and want to copy some lines of code to another place, I selected the lines, about 15-line, press Ctrl-C, and then move to the paste place, and press Ctrl-V, and just nothing happened. I've tried several time, and tried to use mouse and right-button-menu for the copy/paste, the results are the same. And I also tried to copy/paste only one line, it sometimes works, but not always. With multiple lines copy/paste, it sometimes works too. I'm using the Eclipse 3, Windows 2000 pro, JDK 1.4.2, Lomboz.3rc2(before), Lomboz 3(now).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClipboardOperationAction.java
SimpleName curr= (SimpleName) res.get(i);
			IBinding binding= curr.resolveBinding();
			if (binding != null && binding.getKind() == IBinding.TYPE) {
				ITypeBinding typeBinding= (ITypeBinding) binding;
				if (typeBinding.isArray()) {
					typeBinding= typeBinding.getElementType();
				}
				if (typeBinding.isMember() || typeBinding.isTopLevel()) {
					String name= typeBinding.getQualifiedName();
					if (name.length() > 0) {
						namesToImport.add(name);
					}
				}
			}
		}
		if (namesToImport.isEmpty()) {
			return null;
		}
		
		return new ClipboardData(inputElement, (String[]) namesToImport.toArray(new String[namesToImport.size()]));
	}
	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) {