1 /******************************************************************************* 2 * Copyright (c) 2007 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.help; 12 13 import org.eclipse.core.expressions.IEvaluationContext; 14 15 /** 16 * An element in a UA document, which may have conditional enablement (may be 17 * filtered based on certain conditions) and may have sub-elements, or children. 18 * 19 * @since 3.3 20 */ 21 public interface IUAElement { 22 23 /** 24 * Returns whether or not this element should be enabled in the given 25 * context. Elements may be hidden (filtered) if certain conditions are true. 26 * 27 * @param context the context in which the element appears 28 * @return whether or not the element is enabled in the given context 29 */ 30 public boolean isEnabled(IEvaluationContext context); 31 32 /** 33 * Returns all sub-elements (children) of this element. 34 * 35 * @return the sub-elements of this element 36 */ 37 public IUAElement[] getChildren(); 38 } 39