List of usage examples for com.intellij.openapi.command.undo UndoManager isRedoAvailable
public abstract boolean isRedoAvailable(@Nullable FileEditor editor);
From source file:com.intellij.ide.actions.RedoAction.java
License:Apache License
@Override protected boolean isAvailable(FileEditor editor, UndoManager undoManager) { return undoManager.isRedoAvailable(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);// w ww . j a v a 2s .c o m if (fileEditor != null && undoManager.isRedoAvailable(fileEditor)) { undoManager.redo(fileEditor); return true; } return false; }