Bug 299340 [CommonNavigator] Enable new CNF tests
Enable the contributed CNF tests, make minor test improvements.
tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/PipelineTest.java
_contentService.getActivationService().activateExtensions(
				new String[] { COMMON_NAVIGATOR_RESOURCE_EXT,
						COMMON_NAVIGATOR_JAVA_EXT }, true);
		refreshViewer();
		
		_viewer.setSelection(new StructuredSelection(_project
				.getFile(".project")), true); 
		TreeItem[] rootItems = _viewer.getTree().getItems();
		assertEquals(
				"There should be " + _projectCount + " item(s).", _projectCount, rootItems.length); 		
		assertTrue(
				"The root object should be an IJavaProject, which is IAdaptable.", rootItems[0].getData() instanceof IAdaptable); 
		IProject adaptedProject = (IProject) ((IAdaptable) rootItems[_projectInd]
				.getData()).getAdapter(IProject.class);
		assertEquals(_project, adaptedProject);
		IFolder sourceFolder = _project.getFolder(new Path("src"));
		_viewer.add(_project, sourceFolder);
		TreeItem[] projectChildren = rootItems[_projectInd].getItems();
		assertTrue("There should be some items.", projectChildren.length > 0); 
		for (int i = 0; i < projectChildren.length; i++) {
			if (projectChildren[i].getData() == sourceFolder)
				fail("The src folder should not be added as an IFolder.");
		}
		
		IProject newProject = ResourcesPlugin.getWorkspace().getRoot()
				.getProject("New Project");
		_viewer.add(_viewer.getInput(), newProject);
		rootItems = _viewer.getTree().getItems();
		assertEquals("There should be " + (_projectCount + 1) + " items.",
				_projectCount + 1, rootItems.length);