Bug 13189 Refactoring - deleting fields - context menu is overriden by message dialog
20020409-I on Linux-Motif and w2k: 1. Setup JUnit 2. Enable option 'Code Generator->Remove prefix from field names' 3. Open TestCase.java 4. In the outliner, right click on 'fName'. 5. Observe: No context menu is shown, instead, it asks me right away if I want to delete the getter/setter as well.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteSourceReferencesAction.java
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;
	}
	
	/*
	 * @see RefactoringAction#canOperateOn(IStructuredSelection)
	 */
	public boolean canOperateOn(IStructuredSelection selection) {
		if (! super.canOperateOn(selection))
			return false;
		try {
			Map mapping= SourceReferenceUtil.groupByFile(getElementsToProcess()); 
			return ! areAllFilesReadOnly(mapping);
		} catch(JavaModelException e) {
			
			return false;
		}
	}
	
	private static void deleteAll(Map mapping, IFile file) throws CoreException {
		List l= (List)mapping.get(file);
		ISourceReference[] refs= (ISourceReference[]) l.toArray(new ISourceReference[l.size()]);