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 / ISourceReference.java
1 /*
2  * Copyright (c) 2003-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 API
10  * 
11  * $Id: ISourceReference.java,v 1.2 2006-10-21 23:14:29 pombredanne Exp $
12  */
13
14 package net.sourceforge.phpeclipse.core.model;
15
16 import org.eclipse.jface.text.IRegion;
17
18 /**
19  * Common protocol for model elements that have associated source code.
20  */
21 public interface ISourceReference {
22
23         /**
24          * Returns the source code associated with this model element.
25          * 
26          * <p>
27          * This method extracts the substring from the source buffer containing this
28          * source element. This corresponds to the source regione that would be
29          * returned by {@link ISourceReference#getSourceRegion()}</code>.
30          * </p>
31          * 
32          * @return The source code, or <code>null</code> if this element has no
33          *         associated source code
34          */
35         String getSource();
36
37         /**
38          * Returns the source range associated with this element.
39          * 
40          * @return The source region, or <code>null</code> if this element has no
41          *         associated source code
42          */
43         IRegion getSourceRegion();
44
45 }