blob: 69fde0a7650e0c7f2ca756004c91c0325a00876e [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015 Obeo.
* 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
*
* Contributors:
* Obeo - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.intent.mapping.text;
import org.eclipse.intent.mapping.base.ILocation;
/**
* An {@link ILocation} for text content.
*
* @author <a href="mailto:yvan.lussaud@obeo.fr">Yvan Lussaud</a>
*/
public interface ITextLocation extends ILocation {
/**
* Sets the start offset of {@link ITextLocation#getText() text} in the {@link ITextContainer#getText()
* surrounding text}.
*
* @param offset
* the start offset
*/
void setStartOffset(int offset);
/**
* Gets the start offset of {@link ITextLocation#getText() text} in the {@link ITextContainer#getText()
* surrounding text}.
*
* @return the start offset of {@link ITextLocation#getText() text} in the {@link ITextContainer#getText()
* surrounding text}
*/
int getStartOffset();
/**
* Sets the end offset of {@link ITextLocation#getText() text} in the {@link ITextContainer#getText()
* surrounding text}.
*
* @param offset
* the end offset
*/
void setEndOffset(int offset);
/**
* Gets the end offset of {@link ITextLocation#getText() text} in the {@link ITextContainer#getText()
* surrounding text}.
*
* @return the end offset of {@link ITextLocation#getText() text} in the {@link ITextContainer#getText()
* surrounding text}
*/
int getEndOffset();
}