refactor and improve naming
Signed-off-by: Florian Thienel <florian@thienel.org>
diff --git a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/undo/AbstractUndoableEdit.java b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/undo/AbstractUndoableEdit.java
index 43bfb07..67248c9 100644
--- a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/undo/AbstractUndoableEdit.java
+++ b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/undo/AbstractUndoableEdit.java
@@ -24,7 +24,7 @@
private boolean hasBeenDone = false;
@Override
- public boolean combine(final IUndoableEdit edit) {
+ public final boolean combine(final IUndoableEdit edit) {
if (hasBeenDone) {
return performCombine(edit);
}
@@ -44,7 +44,7 @@
}
@Override
- public void redo() throws CannotApplyException {
+ public final void redo() throws CannotApplyException {
if (!canRedo()) {
throw new CannotApplyException();
}
@@ -66,7 +66,7 @@
protected abstract void performRedo() throws CannotApplyException;
@Override
- public void undo() throws CannotUndoException {
+ public final void undo() throws CannotUndoException {
if (!canUndo()) {
throw new CannotUndoException();
}
@@ -95,5 +95,4 @@
public boolean canRedo() {
return !hasBeenDone;
}
-
}
\ No newline at end of file
diff --git a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/undo/CompoundEdit.java b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/undo/CompoundEdit.java
index adf63da..a47196a 100644
--- a/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/undo/CompoundEdit.java
+++ b/org.eclipse.vex.core/src/org/eclipse/vex/core/internal/undo/CompoundEdit.java
@@ -20,11 +20,7 @@
*/
public class CompoundEdit extends AbstractUndoableEdit {
- /**
- * Class constructor.
- */
- public CompoundEdit() {
- }
+ private final List<IUndoableEdit> edits = new ArrayList<IUndoableEdit>();
/**
* Adds an edit to the list.
@@ -72,7 +68,4 @@
return true;
}
- // ===================================================== PRIVATE
-
- private final List<IUndoableEdit> edits = new ArrayList<IUndoableEdit>();
}