new version with WorkingCopy Management
[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 /** 
17  * Element info for ISourceReference elements. 
18  */
19 /* package */ class SourceRefElementInfo extends JavaElementInfo {
20         protected int fSourceRangeStart, fSourceRangeEnd;
21 protected SourceRefElementInfo() {
22         setIsStructureKnown(true);
23 }
24 /**
25  * @see org.eclipse.jdt.internal.compiler.env.ISourceType#getDeclarationSourceEnd()
26  * @see org.eclipse.jdt.internal.compiler.env.ISourceMethod#getDeclarationSourceEnd()
27  * @see org.eclipse.jdt.internal.compiler.env.ISourceField#getDeclarationSourceEnd()
28  */
29 public int getDeclarationSourceEnd() {
30         return fSourceRangeEnd;
31 }
32 /**
33  * @see org.eclipse.jdt.internal.compiler.env.ISourceType#getDeclarationSourceStart()
34  * @see org.eclipse.jdt.internal.compiler.env.ISourceMethod#getDeclarationSourceStart()
35  * @see org.eclipse.jdt.internal.compiler.env.ISourceField#getDeclarationSourceStart()
36  */
37 public int getDeclarationSourceStart() {
38         return fSourceRangeStart;
39 }
40 protected ISourceRange getSourceRange() {
41         return new SourceRange(fSourceRangeStart, fSourceRangeEnd - fSourceRangeStart + 1);
42 }
43 protected void setSourceRangeEnd(int end) {
44         fSourceRangeEnd = end;
45 }
46 protected void setSourceRangeStart(int start) {
47         fSourceRangeStart = start;
48 }
49 }