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;
15 /* package */class CompilationUnitElementInfo extends OpenableElementInfo {
18 * The length of this compilation unit's source code <code>String</code>
20 protected int sourceLength;
23 * Timestamp of original resource at the time this element was opened or
26 protected long timestamp;
29 * Returns the length of the source string.
31 public int getSourceLength() {
35 protected ISourceRange getSourceRange() {
36 return new SourceRange(0, sourceLength);
39 protected boolean isOpen() {
44 * Sets the length of the source string.
46 public void setSourceLength(int newSourceLength) {
47 sourceLength = newSourceLength;