1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.core.internal.watson; 12 13 /** 14 * An interface for objects which can visit an element of 15 * an element tree and access that element's node info. 16 * @see ElementTreeIterator 17 */ 18 public interface IElementContentVisitor { 19 /** Visits a node (element). 20 * <p> Note that <code>elementContents</code> is equal to<code>tree. 21 * getElement(elementPath)</code> but takes no time. 22 * @param tree the element tree being visited 23 * @param elementContents the object at the node being visited on this call 24 * @param requestor callback object for requesting the path of the object being 25 * visited. 26 * @return true if this element's children should be visited, and false 27 * otherwise. 28 */ 29 public boolean visitElement(ElementTree tree, IPathRequestor requestor, Object elementContents); 30 } 31