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(newCu.getPath().removeFirstSegments(2), root.getRawClasspathEntry().getInclusionPatterns(), null));
        assertTrue(newCu.getPath().equals(cu.getPath()));
        
        validateClasspath();
    }
    
    public void testUnexcludeFile() throws CoreException, InvocationTargetException, InterruptedException {
        IPackageFragmentRoot root= addToClasspath(new Path(fNormalFolder));
        IPackageFragment fragment= root.createPackageFragment(fSubFolder, false, null);
        ICompilationUnit cu= createICompilationUnit("C", fragment);
        
        assertTrue(root.getRawClasspathEntry().getExclusionPatterns().length == 0);
        IFile excludedFile= (IFile)executeOperation(IClasspathInformationProvider.EXCLUDE, cu, null, null, null, null);
      
        assertTrue(contains(excludedFile.getFullPath().removeFirstSegments(2), root.getRawClasspathEntry().getExclusionPatterns(), null));
        assertTrue(excludedFile.getFullPath().equals(cu.getPath()));
        
        ICompilationUnit newCu= (ICompilationUnit)executeOperation(IClasspathInformationProvider.UNEXCLUDE, excludedFile, null, null, null, null);
        
        assertFalse(contains(excludedFile.getFullPath().removeFirstSegments(2), root.getRawClasspathEntry().getExclusionPatterns(), null));
        assertTrue(newCu.getPath().equals(cu.getPath()));
        
        validateClasspath();
    }
    
    public void testIncludeFileOnFolder() throws CoreException, InvocationTargetException, InterruptedException {
        IPackageFragmentRoot root= addToClasspath(new Path(fNormalFolder));
        IPackageFragment fragment2= root.createPackageFragment(fSubFolder+"2", false, null);
        executeOperation(IClasspathInformationProvider.INCLUDE, fragment2, null, null, null, null);