Bug 82326 [Dialogs] ClassCastException creating folder
Build: I20050104 1) Create a simple project called "a" 2) Create a simple file in the project called "b" 3) Open the "New Folder" wizard 4) For the parent name, enter "a/b" 5) For the folder name, enter "c" 6) Click finish. ClassCastException: java.lang.ClassCastException: org/eclipse/core/internal/resources/File incompatible with org/eclipse/core/resources/IContainer at org.eclipse.ui.dialogs.ContainerGenerator$1.run(ContainerGenerator.java:169) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1688) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1708) at org.eclipse.ui.dialogs.ContainerGenerator.generateContainer(ContainerGenerator.java:158) at org.eclipse.ui.dialogs.WizardNewFolderMainPage$3.execute(WizardNewFolderMainPage.java:292) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:98) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1688) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:110) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:111)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/ResourceAndContainerGroup.java
null, showClosedProjects);
        else
            containerGroup = new ContainerSelectionGroup(composite, this, true,
                    null, showClosedProjects, heightHint);
        
        Composite nameGroup = new Composite(composite, SWT.NONE);
        layout = new GridLayout();
        layout.numColumns = 2;
        layout.marginWidth = 0;
        nameGroup.setLayout(layout);
        nameGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
                | GridData.GRAB_HORIZONTAL));
        nameGroup.setFont(font);
        Label label = new Label(nameGroup, SWT.NONE);
        label.setText(resourceLabelString);
        label.setFont(font);
        
        resourceNameField = new Text(nameGroup, SWT.BORDER);
        resourceNameField.addListener(SWT.Modify, this);
        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
                | GridData.GRAB_HORIZONTAL);
        data.widthHint = SIZING_TEXT_FIELD_WIDTH;
        resourceNameField.setLayoutData(data);
        resourceNameField.setFont(font);
        validateControls();
    }
    /**
     * Returns the path of the currently selected container
     * or null if no container has been selected. Note that
     * the container may not exist yet if the user entered