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 /* package */ class CompilationUnitElementInfo extends OpenableElementInfo {
19 * The length of this compilation unit's source code <code>String</code>
21 protected int sourceLength;
24 * Timestamp of original resource at the time this element
25 * was opened or last updated.
27 protected long timestamp;
29 * Returns the length of the source string.
31 public int getSourceLength() {
34 protected ISourceRange getSourceRange() {
35 return new SourceRange(0, sourceLength);
37 protected boolean isOpen() {
41 * Sets the length of the source string.
43 public void setSourceLength(int newSourceLength) {
44 sourceLength = newSourceLength;