Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo')
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/CommandCursorPosition.java66
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/IDocumentSelectionMediator.java35
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/IStructuredTextUndoManager.java155
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/StructuredTextCommand.java34
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/UndoDocumentEvent.java45
5 files changed, 0 insertions, 335 deletions
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/CommandCursorPosition.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/CommandCursorPosition.java
deleted file mode 100644
index 1591ae04fe..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/CommandCursorPosition.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.undo;
-
-
-
-public interface CommandCursorPosition {
-
- /**
- * Returns the cursor position to be set to after this command is redone.
- *
- * @return int
- */
- int getRedoCursorPosition();
-
- /**
- * Returns the length of text to be selected after this command is redone.
- *
- * @return int
- */
- int getRedoSelectionLength();
-
- /**
- * Returns the cursor position to be set to after this command is undone.
- *
- * @return int
- */
- int getUndoCursorPosition();
-
- /**
- * Returns the length of text to be selected after this command is undone.
- *
- * @return int
- */
- int getUndoSelectionLength();
-
- /**
- * Sets the cursor position to be used after this command is redone.
- */
- void setRedoCursorPosition(int cursorPosition);
-
- /**
- * Sets the length of text to be selected after this command is redone.
- */
- void setRedoSelectionLength(int selectionLength);
-
- /**
- * Sets the cursor position to be used after this command is undone.
- */
- void setUndoCursorPosition(int cursorPosition);
-
- /**
- * Sets the length of text to be selected after this command is undone.
- */
- void setUndoSelectionLength(int selectionLength);
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/IDocumentSelectionMediator.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/IDocumentSelectionMediator.java
deleted file mode 100644
index f321c38e1d..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/IDocumentSelectionMediator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.undo;
-
-import org.eclipse.jface.text.IDocument;
-
-
-public interface IDocumentSelectionMediator {
- /**
- * Returns the document selection mediator's input document.
- *
- * @return the document selection mediator's input document
- */
- IDocument getDocument();
-
- /**
- * Sets a new selection in the document as a result of an undo operation.
- *
- * UndoDocumentEvent contains the requester of the undo operation, and the
- * offset and length of the new selection. Implementation of
- * IDocumentSelectionMediator can check if it's the requester that caused
- * the new selection, and decide if the new selection should be applied.
- */
- void undoOperationSelectionChanged(UndoDocumentEvent event);
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/IStructuredTextUndoManager.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/IStructuredTextUndoManager.java
deleted file mode 100644
index 5f65824b6f..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/IStructuredTextUndoManager.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.undo;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-
-public interface IStructuredTextUndoManager {
-
- /**
- * Begin recording undo transactions.
- */
- void beginRecording(Object requester);
-
- /**
- * Begin recording undo transactions.
- */
- void beginRecording(Object requester, int cursorPosition, int selectionLength);
-
- /**
- * Begin recording undo transactions.
- */
- void beginRecording(Object requester, String label);
-
- /**
- * Begin recording undo transactions.
- */
- void beginRecording(Object requester, String label, int cursorPosition, int selectionLength);
-
- /**
- * Begin recording undo transactions.
- */
- void beginRecording(Object requester, String label, String description);
-
- /**
- * Begin recording undo transactions.
- */
- void beginRecording(Object requester, String label, String description, int cursorPosition, int selectionLength);
-
- /**
- * Connect the mediator to the undo manager.
- */
- void connect(IDocumentSelectionMediator mediator);
-
- /**
- * Disable undo management.
- */
- void disableUndoManagement();
-
- /**
- * Disconnect the mediator from the undo manager.
- */
- void disconnect(IDocumentSelectionMediator mediator);
-
- /**
- * Enable undo management.
- */
- void enableUndoManagement();
-
- /**
- * End recording undo transactions.
- */
- void endRecording(Object requester);
-
- /**
- * End recording undo transactions.
- */
- void endRecording(Object requester, int cursorPosition, int selectionLength);
-
- /**
- * <p>
- * Normally, the undo manager can figure out the best times when to end a
- * pending command and begin a new one ... to the structure of a structued
- * document. There are times, however, when clients may wish to override
- * those algorithms and end one earlier than normal. The one known case is
- * for multipage editors. If a user is on one page, and type '123' as
- * attribute value, then click around to other parts of page, or different
- * pages, then return to '123|' and type 456, then "undo" they typically
- * expect the undo to just undo what they just typed, the 456, not the
- * whole attribute value.
- * <p>
- * If there is no pending command, the request is ignored.
- */
- public void forceEndOfPendingCommand(Object requester, int currentPosition, int length);
-
- /**
- * Some clients need to do complicated things with undo stack. Plus, in
- * some cases, if clients setCommandStack temporarily, they have
- * reponsibility to set back to original one when finished.
- */
- public CommandStack getCommandStack();
-
- /**
- * Get the redo command even if it's not committed yet.
- */
- Command getRedoCommand();
-
- /**
- * Get the undo command even if it's not committed yet.
- */
- Command getUndoCommand();
-
- /**
- * Redo the last command in the undo manager.
- */
- void redo();
-
- /**
- * Redo the last command in the undo manager and notify the requester
- * about the new selection.
- */
- void redo(IDocumentSelectionMediator requester);
-
- /**
- * Returns whether at least one text change can be repeated. A text change
- * can be repeated only if it was executed and rolled back.
- *
- * @return <code>true</code> if at least on text change can be repeated
- */
- boolean redoable();
-
- /**
- * Set the command stack.
- */
- void setCommandStack(CommandStack commandStack);
-
- /**
- * Undo the last command in the undo manager.
- */
- void undo();
-
- /**
- * Undo the last command in the undo manager and notify the requester
- * about the new selection.
- */
- void undo(IDocumentSelectionMediator requester);
-
- /**
- * Returns whether at least one text change can be rolled back.
- *
- * @return <code>true</code> if at least one text change can be rolled
- * back
- */
- boolean undoable();
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/StructuredTextCommand.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/StructuredTextCommand.java
deleted file mode 100644
index cb0e44b0be..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/StructuredTextCommand.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.undo;
-
-
-
-public interface StructuredTextCommand {
-
- String getTextDeleted();
-
- int getTextEnd();
-
- String getTextInserted();
-
- int getTextStart();
-
- void setTextDeleted(String textDeleted);
-
- void setTextEnd(int textEnd);
-
- void setTextInserted(String textInserted);
-
- void setTextStart(int textStart);
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/UndoDocumentEvent.java b/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/UndoDocumentEvent.java
deleted file mode 100644
index f608829df7..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/undo/UndoDocumentEvent.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.undo;
-
-import org.eclipse.jface.text.IDocument;
-
-public class UndoDocumentEvent {
- private IDocument fDocument;
- private int fLength;
- private int fOffset;
- private IDocumentSelectionMediator fRequester;
-
- public UndoDocumentEvent(IDocumentSelectionMediator requester, IDocument document, int offset, int length) {
- fRequester = requester;
- fDocument = document;
- fOffset = offset;
- fLength = length;
- }
-
- public IDocument getDocument() {
- return fDocument;
- }
-
- public int getLength() {
- return fLength;
- }
-
- public int getOffset() {
- return fOffset;
- }
-
- public IDocumentSelectionMediator getRequester() {
- return fRequester;
- }
-}

Back to the top