A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse.core / src / net / sourceforge / phpeclipse / core / model / ISourceModel.java
1 /*
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
7  * 
8  * Contributors:
9  *     Christopher Lenz - initial implementation
10  * 
11  * $Id: ISourceModel.java,v 1.2 2006-10-21 23:14:29 pombredanne Exp $
12  */
13
14 package net.sourceforge.phpeclipse.core.model;
15
16 /**
17  * 
18  */
19 public interface ISourceModel {
20
21         /**
22          * Returns the top-level elements of the source model.
23          * 
24          * @return an array of the top-level elements
25          */
26         ISourceReference[] getElements();
27
28         /**
29          * Returns the elements that are direct children of the given element.
30          * 
31          * @param 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
35          */
36         ISourceReference[] getChildren(ISourceReference element);
37
38         /**
39          * Returns the direct parent element of the specified element.
40          * 
41          * @param 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)
45          */
46         ISourceReference getParent(ISourceReference element);
47
48 }