01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.editor;
11:
12: import org.eclipse.jface.action.IAction;
13: import org.eclipse.pde.core.IModelChangeProvider;
14:
15: public class NullUndoManager implements IModelUndoManager {
16:
17: /*
18: * @see IModelUndoManager#connect(IModelChangeProvider)
19: */
20: public void connect(IModelChangeProvider provider) {
21: }
22:
23: /*
24: * @see IModelUndoManager#disconnect(IModelChangeProvider)
25: */
26: public void disconnect(IModelChangeProvider provider) {
27: }
28:
29: /*
30: * @see IModelUndoManager#isUndoable()
31: */
32: public boolean isUndoable() {
33: return false;
34: }
35:
36: /*
37: * @see IModelUndoManager#isRedoable()
38: */
39: public boolean isRedoable() {
40: return false;
41: }
42:
43: /*
44: * @see IModelUndoManager#undo()
45: */
46: public void undo() {
47: }
48:
49: /*
50: * @see IModelUndoManager#redo()
51: */
52: public void redo() {
53: }
54:
55: /*
56: * @see IModelUndoManager#setUndoLevelLimit(int)
57: */
58: public void setUndoLevelLimit(int limit) {
59: }
60:
61: /*
62: * @see IModelUndoManager#setIgnoreChanges(boolean)
63: */
64: public void setIgnoreChanges(boolean ignore) {
65: }
66:
67: public void setActions(IAction undoAction, IAction redoAction) {
68: if (undoAction != null)
69: undoAction.setEnabled(false);
70: if (redoAction != null)
71: redoAction.setEnabled(false);
72: }
73: }
|