Bug 6819 Problem setting source folder on existing project
Build 2001-12-06 Start with the following existing structure on disk (not at default location): MyProject /build /dev/src/com/foo/A.java 1) Open new java project wizard. Enter project name. 2) Select the external directory "MyProject" as the location 3) Hit next. Choose "Use source folders..." 4) Click "Create New Folder", enter "dev/src" 5) Choose /MyProject/build as the output folder 6) Hit finish. In the packages view, it shows the source folder "dev/src", AND the non-source folder "dev". Basically the same folder appears twice. If you try to delete the folder "dev" (which appears to be empty), the content on disk is deleted.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteResourcesAction.java
package org.eclipse.jdt.internal.ui.reorg;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.actions.DeleteResourceAction;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.actions.SelectionDispatchAction;
import org.eclipse.jdt.internal.corext.refactoring.Assert;
import org.eclipse.jdt.internal.corext.refactoring.base.ChangeContext;
import org.eclipse.jdt.internal.corext.refactoring.base.Refactoring;
import org.eclipse.jdt.internal.corext.refactoring.reorg.DeleteRefactoring;
import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation;
import org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
public class DeleteResourcesAction extends SelectionDispatchAction {