Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / SourceRefElementInfo.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation 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  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core;
12
13 import net.sourceforge.phpdt.core.ISourceRange;
14
15 /**
16  * Element info for ISourceReference elements.
17  */
18 /* package */class SourceRefElementInfo extends JavaElementInfo {
19         protected int fSourceRangeStart, fSourceRangeEnd;
20
21         protected SourceRefElementInfo() {
22                 setIsStructureKnown(true);
23         }
24
25         /**
26          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceType#getDeclarationSourceEnd()
27          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceMethod#getDeclarationSourceEnd()
28          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceField#getDeclarationSourceEnd()
29          */
30         public int getDeclarationSourceEnd() {
31                 return fSourceRangeEnd;
32         }
33
34         /**
35          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceType#getDeclarationSourceStart()
36          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceMethod#getDeclarationSourceStart()
37          * @see net.sourceforge.phpdt.internal.compiler.env.ISourceField#getDeclarationSourceStart()
38          */
39         public int getDeclarationSourceStart() {
40                 return fSourceRangeStart;
41         }
42
43         protected ISourceRange getSourceRange() {
44                 return new SourceRange(fSourceRangeStart, fSourceRangeEnd
45                                 - fSourceRangeStart + 1);
46         }
47
48         protected void setSourceRangeEnd(int end) {
49                 fSourceRangeEnd = end;
50         }
51
52         protected void setSourceRangeStart(int start) {
53                 fSourceRangeStart = start;
54         }
55 }