david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
amywu | ecebb04 | 2007-04-10 20:07:35 +0000 | [diff] [blame] | 2 | * Copyright (c) 2001, 2005 IBM Corporation and others. |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 3 | * All rights reserved. This program and the accompanying materials |
| 4 | * are made available under the terms of the Eclipse Public License v1.0 |
| 5 | * which accompanies this distribution, and is available at |
| 6 | * http://www.eclipse.org/legal/epl-v10.html |
amywu | ecebb04 | 2007-04-10 20:07:35 +0000 | [diff] [blame] | 7 | * |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 8 | * Contributors: |
| 9 | * IBM Corporation - initial API and implementation |
| 10 | * Jens Lukowski/Innoopract - initial renaming/restructuring |
| 11 | * |
| 12 | *******************************************************************************/ |
david_williams | 4ad020f | 2005-04-18 08:00:30 +0000 | [diff] [blame] | 13 | package org.eclipse.wst.sse.core.internal.undo; |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 14 | |
| 15 | |
| 16 | |
| 17 | public interface CommandCursorPosition { |
| 18 | |
| 19 | /** |
| 20 | * Returns the cursor position to be set to after this command is redone. |
| 21 | * |
| 22 | * @return int |
| 23 | */ |
| 24 | int getRedoCursorPosition(); |
| 25 | |
| 26 | /** |
| 27 | * Returns the length of text to be selected after this command is redone. |
| 28 | * |
| 29 | * @return int |
| 30 | */ |
| 31 | int getRedoSelectionLength(); |
| 32 | |
| 33 | /** |
| 34 | * Returns the cursor position to be set to after this command is undone. |
| 35 | * |
| 36 | * @return int |
| 37 | */ |
| 38 | int getUndoCursorPosition(); |
| 39 | |
| 40 | /** |
| 41 | * Returns the length of text to be selected after this command is undone. |
| 42 | * |
| 43 | * @return int |
| 44 | */ |
| 45 | int getUndoSelectionLength(); |
| 46 | |
| 47 | /** |
| 48 | * Sets the cursor position to be used after this command is redone. |
| 49 | */ |
| 50 | void setRedoCursorPosition(int cursorPosition); |
| 51 | |
| 52 | /** |
| 53 | * Sets the length of text to be selected after this command is redone. |
| 54 | */ |
| 55 | void setRedoSelectionLength(int selectionLength); |
| 56 | |
| 57 | /** |
| 58 | * Sets the cursor position to be used after this command is undone. |
| 59 | */ |
| 60 | void setUndoCursorPosition(int cursorPosition); |
| 61 | |
| 62 | /** |
| 63 | * Sets the length of text to be selected after this command is undone. |
| 64 | */ |
| 65 | void setUndoSelectionLength(int selectionLength); |
| 66 | } |