Example usage for com.intellij.openapi.command.undo UndoManager redo

List of usage examples for com.intellij.openapi.command.undo UndoManager redo

Introduction

In this page you can find the example usage for com.intellij.openapi.command.undo UndoManager redo.

Prototype

public abstract void redo(@Nullable FileEditor editor);

Source Link

Usage

From source file:com.intellij.ide.actions.RedoAction.java

License:Apache License

@Override
protected void perform(FileEditor editor, UndoManager undoManager) {
    undoManager.redo(editor);
}

From source file:com.maddyhome.idea.vim.helper.UndoRedoHelper.java

License:Open Source License

public static boolean redo(@NotNull final DataContext context) {
    final Project project = PlatformDataKeys.PROJECT.getData(context);
    final FileEditor fileEditor = PlatformDataKeys.FILE_EDITOR.getData(context);
    final com.intellij.openapi.command.undo.UndoManager undoManager = com.intellij.openapi.command.undo.UndoManager
            .getInstance(project);/*ww w  .  ja v a2s.  c o m*/
    if (fileEditor != null && undoManager.isRedoAvailable(fileEditor)) {
        undoManager.redo(fileEditor);
        return true;
    }
    return false;
}