/******************************************************************************* * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * *******************************************************************************/ package org.eclipse.dltk.internal.core; import org.eclipse.dltk.core.ISourceRange; /** * use {@link org.eclipse.dltk.core.SourceRange} */ @Deprecated public class SourceRange implements ISourceRange { private int offset, length; public SourceRange(int offset, int length) { this.offset = offset; this.length = length; } public int getLength() { return length; } public int getOffset() { return offset; } @Override public String toString() { int end = getOffset() + getLength() - 1; return "[" + getOffset() + "," + end + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } }