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.1 2004-09-02 18:05:21 jsurfer 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.
31 * @param element the element for which to return the child elements
32 * @return an array of child elements, or an empty array if the given
33 * element has no children
35 ISourceReference[] getChildren(ISourceReference element);
38 * Returns the direct parent element of the specified element.
40 * @param element the element for which the parent should be returned
41 * @return the parent element, or <tt>null</tt> if the specified element
42 * does not have a parent (meaning it is a top-level element)
44 ISourceReference getParent(ISourceReference element);