2 * Copyright (c) 2004 Christopher Lenz and others
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * Christopher Lenz - initial implementation
11 * $Id: ISourceModel.java,v 1.2 2006-10-21 23:14:29 pombredanne Exp $
14 package net.sourceforge.phpeclipse.core.model;
19 public interface ISourceModel {
22 * Returns the top-level elements of the source model.
24 * @return an array of the top-level elements
26 ISourceReference[] getElements();
29 * Returns the elements that are direct children of the given element.
32 * the element for which to return the child elements
33 * @return an array of child elements, or an empty array if the given
34 * element has no children
36 ISourceReference[] getChildren(ISourceReference element);
39 * Returns the direct parent element of the specified element.
42 * the element for which the parent should be returned
43 * @return the parent element, or <tt>null</tt> if the specified element
44 * does not have a parent (meaning it is a top-level element)
46 ISourceReference getParent(ISourceReference element);