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;
17 * Element info for ISourceReference elements.
19 /* package */ class SourceRefElementInfo extends JavaElementInfo {
20 protected int fSourceRangeStart, fSourceRangeEnd;
21 protected SourceRefElementInfo() {
22 setIsStructureKnown(true);
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()
29 public int getDeclarationSourceEnd() {
30 return fSourceRangeEnd;
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()
37 public int getDeclarationSourceStart() {
38 return fSourceRangeStart;
40 protected ISourceRange getSourceRange() {
41 return new SourceRange(fSourceRangeStart, fSourceRangeEnd - fSourceRangeStart + 1);
43 protected void setSourceRangeEnd(int end) {
44 fSourceRangeEnd = end;
46 protected void setSourceRangeStart(int start) {
47 fSourceRangeStart = start;