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 (ISourceReference[]) nonFields.toArray(new ISourceReference[nonFields.size()]);
	}
	
	private static IField[] getFields(ISourceReference[] elements){
		List fields= new ArrayList();
		for (int i= 0; i < elements.length; i++) {
			if (elements[i] instanceof IField)
				fields.add(elements[i]);
		}
		return (IField[]) fields.toArray(new IField[fields.size()]);
	}
	
	private static IMethod[] getGettersSettersForFields(IField[] fields) {
		try {
			String[] namePrefixes= CodeGenerationPreferencePage.getGetterStetterPrefixes();
			String[] nameSuffixes= CodeGenerationPreferencePage.getGetterStetterSuffixes();
			
			List gettersSetters= new ArrayList();
			for (int i= 0; i < fields.length; i++) {
				IMethod getter= GetterSetterUtil.getGetter(fields[i], namePrefixes, nameSuffixes);
				if (getter != null && getter.exists())
					gettersSetters.add(getter);
				IMethod setter= GetterSetterUtil.getSetter(fields[i], namePrefixes, nameSuffixes);
				if (setter != null && setter.exists())
					gettersSetters.add(setter);			
			}
			return  (IMethod[]) gettersSetters.toArray(new IMethod[gettersSetters.size()]);
		} catch(JavaModelException e) {
			ExceptionHandler.handle(e, JavaPlugin.getActiveWorkbenchShell(), ReorgMessages.getString("DeleteSourceReferencesAction.delete_elements"), ReorgMessages.getString("DeleteSourceReferencesAction.exception"));