Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2008-09-11 08:01:34 -0400
committerDani Megert2008-09-11 08:01:34 -0400
commit632fd1ce2f0a9ab9359727ceae521e223ae22973 (patch)
treeb584161996bfb35f9dd2e5dd5ebf1ca5b15493d3 /org.eclipse.text/src/org/eclipse/text/undo
parentecd77176ea6b00c6d7f9f6d751105808d9309158 (diff)
downloadeclipse.platform.text-632fd1ce2f0a9ab9359727ceae521e223ae22973.tar.gz
eclipse.platform.text-632fd1ce2f0a9ab9359727ceae521e223ae22973.tar.xz
eclipse.platform.text-632fd1ce2f0a9ab9359727ceae521e223ae22973.zip
Removed trailing whitespace and organized the importsv20080909-ascu
Diffstat (limited to 'org.eclipse.text/src/org/eclipse/text/undo')
-rw-r--r--org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoEvent.java18
-rw-r--r--org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java62
-rw-r--r--org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManagerRegistry.java12
-rw-r--r--org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoListener.java8
-rw-r--r--org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoManager.java30
-rw-r--r--org.eclipse.text/src/org/eclipse/text/undo/UndoMessages.java3
6 files changed, 67 insertions, 66 deletions
diff --git a/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoEvent.java b/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoEvent.java
index 641b064ee..03a65de05 100644
--- a/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoEvent.java
+++ b/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoEvent.java
@@ -20,7 +20,7 @@ import org.eclipse.jface.text.IDocument;
* <p>
* Clients are not supposed to subclass or create instances of this class.
* </p>
- *
+ *
* @see IDocumentUndoManager
* @see IDocumentUndoListener
* @since 3.2
@@ -77,7 +77,7 @@ public class DocumentUndoEvent {
/**
* Creates a new document event.
- *
+ *
* @param doc the changed document
* @param offset the offset of the replaced text
* @param text the substitution text
@@ -100,7 +100,7 @@ public class DocumentUndoEvent {
/**
* Returns the changed document.
- *
+ *
* @return the changed document
*/
public IDocument getDocument() {
@@ -109,7 +109,7 @@ public class DocumentUndoEvent {
/**
* Returns the offset of the change.
- *
+ *
* @return the offset of the change
*/
public int getOffset() {
@@ -118,7 +118,7 @@ public class DocumentUndoEvent {
/**
* Returns the text that has been inserted.
- *
+ *
* @return the text that has been inserted
*/
public String getText() {
@@ -127,7 +127,7 @@ public class DocumentUndoEvent {
/**
* Returns the text that has been replaced.
- *
+ *
* @return the text that has been replaced
*/
public String getPreservedText() {
@@ -136,7 +136,7 @@ public class DocumentUndoEvent {
/**
* Returns the type of event that is occurring.
- *
+ *
* @return the bit mask that indicates the type (or types) of the event
*/
public int getEventType() {
@@ -145,7 +145,7 @@ public class DocumentUndoEvent {
/**
* Returns the source that triggered this event.
- *
+ *
* @return the source that triggered this event.
*/
public Object getSource() {
@@ -154,7 +154,7 @@ public class DocumentUndoEvent {
/**
* Returns whether the change was a compound change or not.
- *
+ *
* @return <code>true</code> if the undo or redo change is a
* compound change, <code>false</code> if it is not
*/
diff --git a/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java b/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java
index dd14f412a..b28b7d1bc 100644
--- a/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java
+++ b/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java
@@ -53,7 +53,7 @@ import org.eclipse.jface.text.TextUtilities;
* <p>
* This class is not intended to be subclassed.
* </p>
- *
+ *
* @see IDocumentUndoManager
* @see DocumentUndoManagerRegistry
* @see IDocumentUndoListener
@@ -62,8 +62,8 @@ import org.eclipse.jface.text.TextUtilities;
* @noextend This class is not intended to be subclassed by clients.
*/
public class DocumentUndoManager implements IDocumentUndoManager {
-
-
+
+
/**
* Represents an undo-able text change, described as the
* replacement of some preserved text with new text.
@@ -96,7 +96,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Creates a new text change.
- *
+ *
* @param manager the undo manager for this change
*/
UndoableTextChange(DocumentUndoManager manager) {
@@ -117,7 +117,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Sets the start and the end index of this change.
- *
+ *
* @param start the start index
* @param end the end index
*/
@@ -285,7 +285,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Re-applies the change described by this change that was previously
* undone. Also notifies clients about the redo.
- *
+ *
* @param monitor the progress monitor to use if necessary
* @param uiInfo an adaptable that can provide UI info if needed
* @return the status
@@ -315,7 +315,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Creates a new uncommitted text change depending on whether a compound
* change is currently being executed.
- *
+ *
* @return a new, uncommitted text change or a compound text change
*/
protected UndoableTextChange createCurrent() {
@@ -355,7 +355,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Attempt a commit of this change and answer true if a new fCurrent was
* created as a result of the commit.
- *
+ *
* @return <code>true</code> if the change was committed and created
* a new <code>fCurrent</code>, <code>false</code> if not
*/
@@ -370,7 +370,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Checks whether this text change is valid for undo or redo.
- *
+ *
* @return <code>true</code> if the change is valid for undo or redo
*/
protected boolean isValid() {
@@ -407,7 +407,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Return the undo modification stamp
- *
+ *
* @return the undo modification stamp for this change
*/
protected long getUndoModificationStamp() {
@@ -416,15 +416,15 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Return the redo modification stamp
- *
+ *
* @return the redo modification stamp for this change
*/
protected long getRedoModificationStamp() {
return fRedoModificationStamp;
}
}
-
-
+
+
/**
* Represents an undo-able text change consisting of several individual
* changes.
@@ -436,7 +436,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Creates a new compound text change.
- *
+ *
* @param manager the undo manager for this change
*/
UndoableCompoundTextChange(DocumentUndoManager manager) {
@@ -445,7 +445,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Adds a new individual change to this compound change.
- *
+ *
* @param change the change to be added
*/
protected void add(UndoableTextChange change) {
@@ -541,7 +541,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
fDocumentUndoManager.fCurrent= createCurrent();
fDocumentUndoManager.resetProcessChangeState();
}
-
+
/*
* @see org.eclipse.text.undo.UndoableTextChange#isValid()
*/
@@ -575,7 +575,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
return fRedoModificationStamp;
}
}
-
+
/**
* Internal listener to document changes.
@@ -643,7 +643,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
* @see IOperationHistoryListener
*/
private class HistoryListener implements IOperationHistoryListener {
-
+
private IUndoableOperation fOperation;
public void historyNotification(final OperationHistoryEvent event) {
@@ -770,9 +770,9 @@ public class DocumentUndoManager implements IDocumentUndoManager {
private List fConnected;
/**
- *
+ *
* Create a DocumentUndoManager for the given document.
- *
+ *
* @param document the document whose undo history is being managed.
*/
public DocumentUndoManager(IDocument document) {
@@ -820,7 +820,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
}
fCurrent.commit();
}
-
+
/*
* @see org.eclipse.text.undo.IDocumentUndoManager#reset()
*/
@@ -912,7 +912,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Fires a document undo event to all registered document undo listeners.
* Uses a robust iterator.
- *
+ *
* @param offset the document offset
* @param text the text that was inserted
* @param preservedText the text being replaced
@@ -951,7 +951,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Adds the given text edit to the operation history if it is not part of a compound change.
- *
+ *
* @param edit the edit to be added
*/
private void addToOperationHistory(UndoableTextChange edit) {
@@ -981,7 +981,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Checks whether the given text starts with a line delimiter and
* subsequently contains a white space only.
- *
+ *
* @param text the text to check
* @return <code>true</code> if the text is a line delimiter followed by
* whitespace, <code>false</code> otherwise
@@ -1009,7 +1009,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Switches the state of whether there is a text listener or not.
- *
+ *
* @param listen the state which should be established
*/
private void listenToTextChanges(boolean listen) {
@@ -1199,10 +1199,10 @@ public class DocumentUndoManager implements IDocumentUndoManager {
addListeners();
}
-
+
/**
* Reset processChange state.
- *
+ *
* @since 3.2
*/
private void resetProcessChangeState() {
@@ -1227,7 +1227,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
/**
* Return whether or not any clients are connected to the receiver.
- *
+ *
* @return <code>true</code> if the receiver is connected to
* clients, <code>false</code> if it is not
*/
@@ -1258,11 +1258,11 @@ public class DocumentUndoManager implements IDocumentUndoManager {
((UndoableTextChange)op).fDocumentUndoManager= this;
}
}
-
+
IUndoableOperation op= OperationHistoryFactory.getOperationHistory().getUndoOperation(getUndoContext());
if (op != null && !(op instanceof UndoableTextChange))
return;
-
+
// Record the transfer itself as an undoable change.
// If the transfer results from some open operation, recording this change will
// cause our undo context to be added to the outer operation. If there is no
@@ -1279,5 +1279,5 @@ public class DocumentUndoManager implements IDocumentUndoManager {
addToOperationHistory(cmd);
}
-
+
}
diff --git a/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManagerRegistry.java b/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManagerRegistry.java
index 3168f66a2..5a1cf42cc 100644
--- a/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManagerRegistry.java
+++ b/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManagerRegistry.java
@@ -34,7 +34,7 @@ import org.eclipse.jface.text.IDocument;
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public final class DocumentUndoManagerRegistry {
-
+
private static final class Record {
public Record(IDocument document) {
count= 0;
@@ -43,14 +43,14 @@ public final class DocumentUndoManagerRegistry {
private int count;
private IDocumentUndoManager undoManager;
}
-
+
private static Map fgFactory= new HashMap();
-
+
private DocumentUndoManagerRegistry() {
- // Do not instantiate
+ // Do not instantiate
}
-
+
/**
* Connects the file at the given location to this manager. After that call
* successfully completed it is guaranteed that each call to <code>getFileBuffer</code>
@@ -81,7 +81,7 @@ public final class DocumentUndoManagerRegistry {
record.count--;
if (record.count == 0)
fgFactory.remove(document);
-
+
}
/**
diff --git a/org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoListener.java b/org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoListener.java
index aecf1b4e7..2c332eeaf 100644
--- a/org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoListener.java
+++ b/org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoListener.java
@@ -22,15 +22,15 @@ package org.eclipse.text.undo;
* <p>
* Clients may implement this interface.
* </p>
- *
+ *
* @since 3.2
*/
public interface IDocumentUndoListener {
-
+
/**
- * The document is involved in an undo-related change. Notify listeners
+ * The document is involved in an undo-related change. Notify listeners
* with an event describing the change.
- *
+ *
* @param event the document undo event that describes the particular notification
*/
void documentUndoNotification(DocumentUndoEvent event);
diff --git a/org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoManager.java b/org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoManager.java
index 09356cc32..a45214a6f 100644
--- a/org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoManager.java
+++ b/org.eclipse.text/src/org/eclipse/text/undo/IDocumentUndoManager.java
@@ -30,7 +30,7 @@ import org.eclipse.core.commands.operations.IUndoContext;
* <p>
* Clients may implement this interface.
* </p>
- *
+ *
* @see DocumentUndoManagerRegistry
* @see IDocumentUndoListener
* @see org.eclipse.jface.text.IDocument
@@ -52,7 +52,7 @@ public interface IDocumentUndoManager {
* background thread. Any UI access occurring inside the implementation must
* be properly synchronized using the techniques specified by the client's
* widget library.</p>
- *
+ *
* @param listener the document undo listener to be added as a listener
*/
void addDocumentUndoListener(IDocumentUndoListener listener);
@@ -62,14 +62,14 @@ public interface IDocumentUndoManager {
* <p>
* Removing a listener which is not registered has no effect
* </p>
- *
+ *
* @param listener the document undo listener to be removed
*/
void removeDocumentUndoListener(IDocumentUndoListener listener);
/**
* Returns the undo context registered for this document
- *
+ *
* @return the undo context registered for this document
*/
IUndoContext getUndoContext();
@@ -83,7 +83,7 @@ public interface IDocumentUndoManager {
* Connects to the undo manager. Used to signify that a client is monitoring
* the history kept by the undo manager. This message has no effect if the
* client is already connected.
- *
+ *
* @param client the object connecting to the undo manager
*/
void connect(Object client);
@@ -93,7 +93,7 @@ public interface IDocumentUndoManager {
* longer monitoring the history kept by the undo manager. If all clients
* have disconnected from the undo manager, the undo history will be
* deleted.
- *
+ *
* @param client the object disconnecting from the undo manager
*/
void disconnect(Object client);
@@ -114,11 +114,11 @@ public interface IDocumentUndoManager {
/**
* Sets the limit of the undo history to the specified value. The provided
* limit will supersede any previously set limit.
- *
+ *
* @param undoLimit the length of this undo manager's history
*/
void setMaximalUndoLevel(int undoLimit);
-
+
/**
* Resets the history of the undo manager. After that call,
* there aren't any undo-able or redo-able text changes.
@@ -142,27 +142,27 @@ public interface IDocumentUndoManager {
/**
* Rolls back the most recently executed text change.
- *
+ *
* @throws ExecutionException if an exception occurred during undo
*/
void undo() throws ExecutionException;
/**
* Repeats the most recently rolled back text change.
- *
+ *
* @throws ExecutionException if an exception occurred during redo
*/
void redo() throws ExecutionException;
/**
* Transfers the undo history from the specified document undo manager to
- * this undo manager. This message should only be used when it is known
+ * this undo manager. This message should only be used when it is known
* that the content of the document of the original undo manager when the
- * last undo operation was recorded is the same as this undo manager's
+ * last undo operation was recorded is the same as this undo manager's
* current document content, since the undo history is based on document
- * indexes. It is the responsibility of the caller
- * to ensure that this call is used correctly.
- *
+ * indexes. It is the responsibility of the caller
+ * to ensure that this call is used correctly.
+ *
* @param manager the document undo manger whose history is to be transferred to the receiver
*/
public void transferUndoHistory(IDocumentUndoManager manager);
diff --git a/org.eclipse.text/src/org/eclipse/text/undo/UndoMessages.java b/org.eclipse.text/src/org/eclipse/text/undo/UndoMessages.java
index c9388d604..0a5fa8222 100644
--- a/org.eclipse.text/src/org/eclipse/text/undo/UndoMessages.java
+++ b/org.eclipse.text/src/org/eclipse/text/undo/UndoMessages.java
@@ -10,10 +10,11 @@
*******************************************************************************/
package org.eclipse.text.undo;
-import com.ibm.icu.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import com.ibm.icu.text.MessageFormat;
+
/**
* Helper class to get NLSed messages.
*

Back to the top