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