Bug 33175 Missing target in delete imports dialog
Problem Description: While browsing a class in the outline view, if the "delete" item from the context menu of the "import declarations" item is selected, the pop-up confirmation dialog asks 'Are you sure you want to delete ""?' (i.e 'import declarations' is missing between the quotes). Steps to Reproduce: 1. Open a Java perspective and reset it if necessary. 2. Select File->New->Project from the menu bar. 3. Highlight "Java" and "Java Project", and click "Next" 4. Enter "test" in the project name text field, and then click "Finish". A project called "test" will be created in the Package Explorer. Expand the item to see the sub-tree below it. Note that there is no "default package" item. 5. Make sure the "test" project is highlighted, and click on the "Create a new java class" button in the toolbar. A "Java Class" dialog opens. 6. Enter "ClassTest" in the "Name" text field. Click "Finish". A "(default package)" item is added below the "test" item, and an edit window containing ClassTest opens. 7. On the very first line of the class file, type "import java.util.*;" on a line by itself. The Outline View should now contain a "import declarations" item. 8. Left click on the "import declarations" item in the Outline view, and then right click it. Select "Delete" from the context menu. 9. !BUG! The pop-up confirmation window is missing the target between the quotes at the end of the question. Found in: OS: HP-UX 11.11. Eclipse: V2.1 Build Id: 200302061700 (M5)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteSourceReferencesAction.java
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.PlatformUI;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.corext.Assert;
import org.eclipse.jdt.internal.corext.codemanipulation.GetterSetterUtil;
import org.eclipse.jdt.internal.corext.refactoring.reorg.DeleteSourceReferenceEdit;
import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils;
import org.eclipse.jdt.internal.corext.refactoring.reorg.SourceReferenceUtil;
import org.eclipse.jdt.internal.corext.textmanipulation.TextBuffer;
import org.eclipse.jdt.internal.corext.textmanipulation.TextBufferEditor;
import org.eclipse.jdt.internal.corext.textmanipulation.TextEdit;
import org.eclipse.jdt.internal.corext.util.WorkingCopyUtil;
public class DeleteSourceReferencesAction extends SourceReferenceAction {
	private boolean fCanDeleteGetterSetter;
	private boolean fAskForDeleteConfirmation;
	
	public DeleteSourceReferencesAction(IWorkbenchSite site) {
		super(site);