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
9 * Christopher Lenz - initial API
11 * $Id: ISourceReference.java,v 1.1 2004-09-02 18:05:21 jsurfer Exp $
14 package net.sourceforge.phpeclipse.core.model;
16 import org.eclipse.jface.text.IRegion;
19 * Common protocol for model elements that have associated source code.
21 public interface ISourceReference {
24 * Returns the source code associated with this model element.
27 * This method extracts the substring from the source buffer containing
28 * this source element. This corresponds to the source regione that would
29 * be returned by {@link ISourceReference#getSourceRegion()}</code>.
32 * @return The source code, or <code>null</code> if this element has no
33 * associated source code
38 * Returns the source range associated with this element.
40 * @return The source region, or <code>null</code> if this element has no
41 * associated source code
43 IRegion getSourceRegion();