Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2017-02-02 10:54:24 -0500
committerLars Vogel2017-02-03 03:14:55 -0500
commit88a51667c841267a5a7076c649890a356bde0822 (patch)
tree17092d5f489d014e56b48ad75a073cc0d336640d /org.eclipse.text/src/org/eclipse/text/undo
parent7a0eb42a180d25360a95657e2727e17b7d6d2132 (diff)
downloadeclipse.platform.text-88a51667c841267a5a7076c649890a356bde0822.tar.gz
eclipse.platform.text-88a51667c841267a5a7076c649890a356bde0822.tar.xz
eclipse.platform.text-88a51667c841267a5a7076c649890a356bde0822.zip
Bug 493304 - Prefer usage of enhanced for loop in eclipse.platform.text
repo This change is for the for org.eclipse.text plug-in Change-Id: I9a02ba945e91d7e1361627239c3617010453c571 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.text/src/org/eclipse/text/undo')
-rw-r--r--org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java4
1 files changed, 2 insertions, 2 deletions
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 aef594799..a4755de51 100644
--- a/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java
+++ b/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java
@@ -1190,9 +1190,9 @@ public class DocumentUndoManager implements IDocumentUndoManager {
IUndoContext oldUndoContext= manager.getUndoContext();
// Get the history for the old undo context.
IUndoableOperation [] operations= OperationHistoryFactory.getOperationHistory().getUndoHistory(oldUndoContext);
- for (int i= 0; i < operations.length; i++) {
+ for (IUndoableOperation operation : operations) {
// First replace the undo context
- IUndoableOperation op= operations[i];
+ IUndoableOperation op= operation;
if (op instanceof IContextReplacingOperation) {
((IContextReplacingOperation)op).replaceContext(oldUndoContext, getUndoContext());
} else {

Back to the top