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
int nrIncluded= entry.getInclusionPatterns().length;
        int nrExcluded= entry.getExclusionPatterns().length;
        
        IPackageFragment frag= (IPackageFragment)executeOperation(IClasspathInformationProvider.UNINCLUDE, fragment, null, null, null, null);
        
        entry= root.getRawClasspathEntry();
        IPath[] inclusionPatterns= entry.getInclusionPatterns();
        IPath[] exclusionPatterns= entry.getExclusionPatterns();
        assertTrue(inclusionPatterns.length + 1 == nrIncluded);
        assertTrue(exclusionPatterns.length == nrExcluded);
        assertFalse(contains(new Path(fragment.getElementName()), inclusionPatterns, null));
        assertFalse(contains(new Path(fragment.getElementName()), exclusionPatterns, null));
        assertTrue(frag.getPath().equals(fragment.getPath()));
        
        validateClasspath();
    }
    
    public void testRemoveExclusion() throws JavaModelException, CoreException, InvocationTargetException, InterruptedException {
        IFolder cpFolder= excludePackage();
        
        IPackageFragmentRoot root= fProject.findPackageFragmentRoot(cpFolder.getFullPath());
        IFolder folder= getFolderHandle(cpFolder.getProjectRelativePath().append(fSubFolder));
        
        IClasspathEntry entry= root.getRawClasspathEntry();
        int nrIncluded= entry.getInclusionPatterns().length;
        int nrExcluded= entry.getExclusionPatterns().length;
        
        IPackageFragment fragment= (IPackageFragment)executeOperation(IClasspathInformationProvider.UNEXCLUDE, folder, null, null, null, null);
        
        entry= root.getRawClasspathEntry();