Bug 98472 New project wizard: second page remove from class path should ask for removal of folder when linked
RC1 - create a new project - switch to the second page - link in additional source observe: there is no way to unlink the addtional source We should offer to unlink the folder when the folder is removed from the build path again.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/dialogs/NewProjectWizardTest.java
IPackageFragmentRoot projectRoot= getProjectRoot(fProject.getCorrespondingResource());
        IPackageFragment fragment= projectRoot.createPackageFragment("", false, null);
        
        assertTrue(ClasspathModifier.getClasspathEntryFor(fProject.getPath(), fProject, IClasspathEntry.CPE_SOURCE) == null);
        assertFalse(ClasspathModifier.getClasspathEntryFor(root.getPath(), fProject, IClasspathEntry.CPE_SOURCE) == null);
        assertTrue(fProject.findPackageFragment(normalFolder.getFullPath()) == null);
        assertTrue(fProject.findPackageFragment(fragment.getPath()) == null);
        
        IJavaProject project= (IJavaProject)executeOperation(IClasspathInformationProvider.ADD_SEL_SF_TO_BP, fProject, getOutputFolderQueryInternal(fProject.getOutputLocation()), null, null, null);
        assertTrue(project.equals(fProject));
        
        
        assertFalse(ClasspathModifier.getClasspathEntryFor(fProject.getPath(), fProject, IClasspathEntry.CPE_SOURCE) == null);
        
        assertFalse(ClasspathModifier.getClasspathEntryFor(root.getPath(), fProject, IClasspathEntry.CPE_SOURCE) == null);
        assertTrue(ClasspathModifier.isExcluded(root.getUnderlyingResource(), fProject));
        assertFalse(fProject.findPackageFragment(normalFolder.getFullPath()) == null);
        assertFalse(fProject.findPackageFragment(fragment.getPath()) == null);
        
        validateClasspath();
    }
    
    public void testAddJarFileToCP() throws InvocationTargetException, InterruptedException, CoreException, IOException {
        IPath libraryPath= fProject.getPath().append("src2").append("archive.jar");
        testRemoveJarFileFromCP();
        IFile jarFile= fProject.getProject().getFile(libraryPath.removeFirstSegments(1));
        assertTrue(jarFile.getFileExtension().equals("jar"));
        
        IPackageFragmentRoot root= (IPackageFragmentRoot)executeOperation(IClasspathInformationProvider.ADD_SEL_LIB_TO_BP, jarFile, getOutputFolderQueryInternal(fProject.getOutputLocation()), null, null, null);
        assertFalse(ClasspathModifier.getClasspathEntryFor(root.getPath(), fProject, IClasspathEntry.CPE_LIBRARY) == null);