Bug 263207 [CommonNavigator] Improve DnD tracing and add DnD test suite
There are no DnD tests for the Common Navigator. Also, the CNF has many test utility classes (basically stolen from JDT), these should be moved into a lower level area, and it looks like org.eclipse.ui.test.harness is a good place. (Perhaps we can get the JDT to use these identical versions as well so there is only one copy that everyone uses). Finally, the DnD tracing needs to be improved to show more information and show it more concisely.
tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/INavigatorContentServiceTests.java
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import junit.framework.TestCase;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.navigator.NavigatorContentService;
import org.eclipse.ui.navigator.CommonViewer;
import org.eclipse.ui.navigator.INavigatorContentDescriptor;
import org.eclipse.ui.navigator.INavigatorContentExtension;
import org.eclipse.ui.navigator.INavigatorContentService;
import org.eclipse.ui.navigator.NavigatorContentServiceFactory;
import org.eclipse.ui.tests.navigator.extension.TestContentProvider;
import org.eclipse.ui.tests.navigator.util.TestWorkspace;
public class INavigatorContentServiceTests extends TestCase {
	public static final String COMMON_NAVIGATOR_INSTANCE_ID = "org.eclipse.ui.tests.navigator.TestView";
	public static final String TEST_EXTENSION_ID = "org.eclipse.ui.tests.navigator.testContent";
	
	public static final String ENFORCE_HASCHILDREN_EXTENSION_ID = "org.eclipse.ui.tests.navigator.testHasChildren";
	public static final String TEST_EXTENSION_2_ID = "org.eclipse.ui.tests.navigator.testContent2";
	public static final String RESOURCE_EXTENSION_ID = "org.eclipse.ui.navigator.resourceContent";
	private final Map expectedChildren = new HashMap();