Bug 299331 [CommonNavigator] Compile errors in new CNF tests
tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/extension/TestPipelineProvider.java
if (element instanceof IProject) {
			return (IProject) element;
		}
		if (element instanceof IAdaptable) {
			return (IProject) ((IAdaptable)element).getAdapter(IProject.class);
		}
		return null;
	}
	/**
	 * @param elements2
	 * @param anInput
	 * @param id
	 */
	private void _track(Map map, Object key, String id) {
		if (key instanceof ResourceWrapper) {
			key = ((ResourceWrapper)key).getResource();
		}
		String queries = (String) map.get(key);
		StringBuilder buf = new StringBuilder(queries==null ? "" : queries);
		buf.append(id);
		map.put(key, buf.toString());		
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptAdd(org.eclipse.ui.navigator.PipelinedShapeModification)
	 */
	public PipelinedShapeModification interceptAdd(PipelinedShapeModification anAddModification) {
		Set children = anAddModification.getChildren();
		for (Iterator it = children.iterator(); it.hasNext(); ) {
			_track(ADDS, it.next(), _id);
		}