EclipseJDT Source Viewer

Home|eclipse_jdt/src/org/eclipse/jdt/core/dom/rewrite/ITrackedNodePosition.java
1/*******************************************************************************
2 * Copyright (c) 2004, 2008 IBM Corporation and others.
3 *
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
8 *
9 * SPDX-License-Identifier: EPL-2.0
10 *
11 * Contributors:
12 *     IBM Corporation - initial API and implementation
13 *******************************************************************************/
14package org.eclipse.jdt.core.dom.rewrite;
15
16/**
17 * A tracked node position is returned when a rewrite change is
18 * requested to be tracked.
19 * <p>
20 * This interface is not intended to be implemented by clients.
21 * </p>
22 *
23 * @see ASTRewrite#track(org.eclipse.jdt.core.dom.ASTNode)
24 * @since 3.0
25 * @noimplement This interface is not intended to be implemented by clients.
26 */
27public interface ITrackedNodePosition {
28
29    /**
30     * Returns the original or modified start position of the tracked node depending if called before
31     * or after the rewrite is applied. <code>-1</code> is returned for removed nodes.
32     *
33     * @return the original or modified start position of the tracked node
34     */
35    public int getStartPosition();
36
37    /**
38     * Returns the original or modified length of the tracked node depending if called before
39     * or after the rewrite is applied. <code>-1</code> is returned for removed nodes.
40     *
41     * @return the original or modified length of the tracked node
42     */
43    public int getLength();
44
45
46}
47
MembersX
ITrackedNodePosition:getStartPosition
ITrackedNodePosition:getLength
Members
X