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
assertFalse(contains(new Path(fragment.getElementName()), entry.getExclusionPatterns(), null));
        
        addToClasspath(fragment);
         
        entry= root.getRawClasspathEntry();
        assertTrue(contains(new Path(fragment.getElementName()), entry.getExclusionPatterns(), null));
        assertTrue(entry.getExclusionPatterns().length - 1 == nrExclusions);
        
        validateClasspath();
    }
    
    public void testAddIncludedPackageToCP() throws JavaModelException, CoreException, InvocationTargetException, InterruptedException {
        IFolder cpFolder= includePackage();
        
        IPackageFragmentRoot root= fProject.findPackageFragmentRoot(cpFolder.getFullPath());
        IPackageFragment fragment= root.getPackageFragment(fSubFolder);
        
        IClasspathEntry entry= root.getRawClasspathEntry();
        
        int nrInclusions= entry.getInclusionPatterns().length;
        int nrExclusions= entry.getExclusionPatterns().length;
        assertTrue(contains(new Path(fragment.getElementName()), entry.getInclusionPatterns(), null));
        assertFalse(contains(new Path(fragment.getElementName()), entry.getExclusionPatterns(), null));
        
        addToClasspath(fragment);
        
        entry= root.getRawClasspathEntry();
        assertFalse(contains(new Path(fragment.getElementName()), entry.getInclusionPatterns(), null));
        assertTrue(contains(new Path(fragment.getElementName()), entry.getExclusionPatterns(), null));
        assertTrue(entry.getInclusionPatterns().length + 1 == nrInclusions);