|
What this is
Other links
The source code/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.pde.internal.ui.editor; import org.eclipse.jface.action.IAction; import org.eclipse.pde.core.IModelChangeProvider; public class NullUndoManager implements IModelUndoManager { /* * @see IModelUndoManager#connect(IModelChangeProvider) */ public void connect(IModelChangeProvider provider) { } /* * @see IModelUndoManager#disconnect(IModelChangeProvider) */ public void disconnect(IModelChangeProvider provider) { } /* * @see IModelUndoManager#isUndoable() */ public boolean isUndoable() { return false; } /* * @see IModelUndoManager#isRedoable() */ public boolean isRedoable() { return false; } /* * @see IModelUndoManager#undo() */ public void undo() { } /* * @see IModelUndoManager#redo() */ public void redo() { } /* * @see IModelUndoManager#setUndoLevelLimit(int) */ public void setUndoLevelLimit(int limit) { } /* * @see IModelUndoManager#setIgnoreChanges(boolean) */ public void setIgnoreChanges(boolean ignore) { } public void setActions(IAction undoAction, IAction redoAction) { if (undoAction != null) undoAction.setEnabled(false); if (redoAction != null) redoAction.setEnabled(false); } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.