Bug 20151 Copy/Paste inserts two new lines [ccp]
F3 - select a method in ouliner - copy - select CU - paste observe: method has two trailing newlines. There should be only one. May be this is a regression of the CodeFormatter fix
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/PasteSourceReferencesFromClipboardAction.java
}	
	}
	
	private  boolean canPasteAfter(ISourceReference ref, TypedSource[] elements){
		if (ref instanceof ICompilationUnit)
			return false;
		if (ref instanceof IImportContainer)
			return canPasteAtTopLevel(elements);
		if (ref instanceof IImportDeclaration)
			return canPasteAtTopLevel(elements);
		if (ref instanceof IPackageDeclaration)
			return canPasteAtTopLevel(elements);
		
		
		if (ref instanceof IType)
			return canPasteAfterType(elements);
				
		if (ref instanceof IMember)
			return  canPasteAfterMember(elements);
		return false;
	}
	
	private  boolean canPasteAfterType(TypedSource[] elems){
		return areAllValuesOfType(elems, IJavaElement.TYPE);
	}
	private  boolean canPasteAtTopLevel(TypedSource[] elements){
		for (int i= 0; i < elements.length; i++) {
			if (! canPasteAfterImportContainerOrDeclaration(elements[i].getType()))
				return false;
		}