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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core;
13 import net.sourceforge.phpdt.core.ISourceRange;
16 * Element info for ISourceReference elements.
18 /* package */class SourceRefElementInfo extends JavaElementInfo {
19 protected int fSourceRangeStart, fSourceRangeEnd;
21 protected SourceRefElementInfo() {
22 setIsStructureKnown(true);
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()
30 public int getDeclarationSourceEnd() {
31 return fSourceRangeEnd;
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()
39 public int getDeclarationSourceStart() {
40 return fSourceRangeStart;
43 protected ISourceRange getSourceRange() {
44 return new SourceRange(fSourceRangeStart, fSourceRangeEnd
45 - fSourceRangeStart + 1);
48 protected void setSourceRangeEnd(int end) {
49 fSourceRangeEnd = end;
52 protected void setSourceRangeStart(int start) {
53 fSourceRangeStart = start;