4ae15852123026960fa0924107fc5870fc2c8074
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / CompilationUnitElementInfo.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 /* package */ class CompilationUnitElementInfo extends OpenableElementInfo {
17
18         /**
19          * The length of this compilation unit's source code <code>String</code>
20          */
21         protected int fSourceLength;
22
23         /** 
24          * Timestamp of original resource at the time this element
25          * was opened or last updated.
26          */
27         protected long fTimestamp;
28 /**
29  * Returns the length of the source string.
30  */
31 public int getSourceLength() {
32         return fSourceLength;
33 }
34 protected ISourceRange getSourceRange() {
35         return new SourceRange(0, fSourceLength);
36 }
37 /**
38  * Sets the length of the source string.
39  */
40 public void setSourceLength(int newSourceLength) {
41         fSourceLength = newSourceLength;
42 }
43 }