Bug 21808 delete confirmation prompts inconsistent with Navigator view [ccp]
Select a .java file in the Package Explorer and then Delete from its context menu. A Confirm Delete windows appears saying, "Are you sure you want to delete the selected element(s)? Yes or No. If you try the same thing from the Navigator view, a Confirm Resource Delete window appears saying, "Are you sure you want to delete 'xxx.java'? Yes or No. Likewise, if you select multiple resources to delete, you will get different behavior between the Package Explorer and Navigator views. For the former, the Confirm Delete window appears saying, "Are you sure you want to delete the selected element(s)?" Yes or No. For the latter, a Confirm Multiple Resource Delete window appears saying, "Are you sure you want to delete these 3 resources?" Yes or No. So, the delete confirmation prompts that appear in the Packages Explorer view aren't consistent with those in the Navigator view.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteSourceReferencesAction.java
IFile file= (IFile)iter.next();
			if (emptyCuList.contains(JavaCore.create(file))) 
				continue;
			if (isReadOnly(file))
				continue;
			deleteAll(mapping, file, new SubProgressMonitor(pm, 1));
		}
		
		ICompilationUnit[] notDeleted= deleteEmptyCus(mapping, new SubProgressMonitor(pm, size));
		for (int i= 0; i < notDeleted.length; i++) {
			IFile file= (IFile)notDeleted[i].getUnderlyingResource();
			if (isReadOnly(file))
				continue;
			deleteAll(mapping, file, new SubProgressMonitor(pm, 1));
		}		
	}
	private static boolean isReadOnly(IFile file){
		if (! file.isReadOnly())
			return false;
		if (ResourcesPlugin.getWorkspace().validateEdit(new IFile[]{file}, null).isOK())
			return false;
		return true;
	}
	
	private static boolean areAllFilesReadOnly(Map mapping){
		for (Iterator iter= mapping.keySet().iterator(); iter.hasNext();) {
			if (! isReadOnly((IFile)iter.next()))
				return false;
		}
		return true;