[Macros] Remove IMacroInstructionsListener.preAddMacroInstruction
Change-Id: Ia817d1552610330e5bd6279d880589b2472052fe
Signed-off-by: Fabio Zadrozny <fabiofz@gmail.com>
diff --git a/bundles/org.eclipse.e4.core.macros/src/org/eclipse/e4/core/macros/IMacroInstructionsListener.java b/bundles/org.eclipse.e4.core.macros/src/org/eclipse/e4/core/macros/IMacroInstructionsListener.java
index e5099ef..00232f0 100644
--- a/bundles/org.eclipse.e4.core.macros/src/org/eclipse/e4/core/macros/IMacroInstructionsListener.java
+++ b/bundles/org.eclipse.e4.core.macros/src/org/eclipse/e4/core/macros/IMacroInstructionsListener.java
@@ -13,31 +13,11 @@
/**
* An instance of this interface can be notified of changes during macro
* recording.
- *
- * <ul>
- * <li>FIXME: this seems to be more of an adviser than listener?
- * <li>FIXME: rename preAddMacroInstruction -> verifyMacroInstruction()?
- * </ul>
*/
public interface IMacroInstructionsListener {
/**
- * Called before adding a macro instruction to the macro.
- *
- * @param macroInstruction
- * the macro instruction to be added.
- * @throws CancelMacroRecordingException
- * if the recording of the macro should stop before actually adding
- * the given macro instruction.
- */
- void preAddMacroInstruction(IMacroInstruction macroInstruction) throws CancelMacroRecordingException;
-
- /**
- * Called after a given macro instruction is added to the macro. Note that
- * it is possible that {@link #preAddMacroInstruction(IMacroInstruction)} is
- * called without a matching
- * {@link #postAddMacroInstruction(IMacroInstruction)) should the macro
- * instruction not be of high-enough priority.
+ * Called after a given macro instruction is added to the macro.
*
* @param macroInstruction
* the macro instruction added to the current macro.
diff --git a/bundles/org.eclipse.e4.core.macros/src/org/eclipse/e4/core/macros/internal/MacroManager.java b/bundles/org.eclipse.e4.core.macros/src/org/eclipse/e4/core/macros/internal/MacroManager.java
index 2f095f8..0e481c7 100644
--- a/bundles/org.eclipse.e4.core.macros/src/org/eclipse/e4/core/macros/internal/MacroManager.java
+++ b/bundles/org.eclipse.e4.core.macros/src/org/eclipse/e4/core/macros/internal/MacroManager.java
@@ -157,9 +157,6 @@
public void addMacroInstruction(IMacroInstruction macroInstruction) throws CancelMacroRecordingException {
ComposableMacro macroBeingRecorded = fMacroBeingRecorded;
if (macroBeingRecorded != null) {
- for (IMacroInstructionsListener listener : fMacroInstructionsListeners) {
- listener.preAddMacroInstruction(macroInstruction);
- }
macroBeingRecorded.addMacroInstruction(macroInstruction);
for (IMacroInstructionsListener listener : fMacroInstructionsListeners) {
listener.postAddMacroInstruction(macroInstruction);
@@ -198,9 +195,6 @@
throws CancelMacroRecordingException {
ComposableMacro macroBeingRecorded = fMacroBeingRecorded;
if (macroBeingRecorded != null) {
- for (IMacroInstructionsListener listener : fMacroInstructionsListeners) {
- listener.preAddMacroInstruction(macroInstruction);
- }
if (macroBeingRecorded.addMacroInstruction(macroInstruction, event, priority)) {
for (IMacroInstructionsListener listener : fMacroInstructionsListeners) {
listener.postAddMacroInstruction(macroInstruction);
diff --git a/bundles/org.eclipse.e4.ui.macros/src/org/eclipse/e4/ui/macros/internal/actions/KeepMacroUIUpdated.java b/bundles/org.eclipse.e4.ui.macros/src/org/eclipse/e4/ui/macros/internal/actions/KeepMacroUIUpdated.java
index f907344..4f9d5bd 100644
--- a/bundles/org.eclipse.e4.ui.macros/src/org/eclipse/e4/ui/macros/internal/actions/KeepMacroUIUpdated.java
+++ b/bundles/org.eclipse.e4.ui.macros/src/org/eclipse/e4/ui/macros/internal/actions/KeepMacroUIUpdated.java
@@ -29,10 +29,6 @@
* instructions.
*/
private static final class MacroInstructionsListener implements IMacroInstructionsListener {
- @Override
- public void preAddMacroInstruction(IMacroInstruction macroInstruction) {
-
- }
@Override
public void postAddMacroInstruction(IMacroInstruction macroInstruction) {