当前位置: 首页>>代码示例>>Java>>正文


Java UndoManager.isRedoInProgress方法代码示例

本文整理汇总了Java中com.intellij.openapi.command.undo.UndoManager.isRedoInProgress方法的典型用法代码示例。如果您正苦于以下问题:Java UndoManager.isRedoInProgress方法的具体用法?Java UndoManager.isRedoInProgress怎么用?Java UndoManager.isRedoInProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.command.undo.UndoManager的用法示例。


在下文中一共展示了UndoManager.isRedoInProgress方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: documentChanged

import com.intellij.openapi.command.undo.UndoManager; //导入方法依赖的package包/类
@Override
public void documentChanged(DocumentEvent e) {
  UndoManager undoManager = UndoManager.getInstance(myProject);
  boolean undoOrRedo = undoManager.isUndoInProgress() || undoManager.isRedoInProgress();
  if (undoOrRedo) {
    // allow undo/redo up until 'creation stamp' back in time
    // and check it after action is completed
    if (e.getDocument() == myOrigDocument) {
      //noinspection SSBasedInspection
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
          if (myOrigCreationStamp > myOrigDocument.getModificationStamp()) {
            closeEditor();
          }
        }
      });
    }
  }
  else if (e.getDocument() == myNewDocument) {
    commitToOriginal(e);
    if (!isValid()) {
      ApplicationManager.getApplication().invokeLater(new Runnable() {
        @Override
        public void run() {
          closeEditor();
        }
      }, myProject.getDisposed());
    }
  }
  else if (e.getDocument() == myOrigDocument) {
    if (myCommittingToOriginal || myAltFullRange != null && myAltFullRange.isValid()) return;
    ApplicationManager.getApplication().invokeLater(new Runnable() {
      @Override
      public void run() {
        closeEditor();
      }
    }, myProject.getDisposed());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:QuickEditHandler.java

示例2: documentChanged

import com.intellij.openapi.command.undo.UndoManager; //导入方法依赖的package包/类
@Override
public void documentChanged(DocumentEvent e) {
  UndoManager undoManager = UndoManager.getInstance(myProject);
  boolean undoOrRedo = undoManager.isUndoInProgress() || undoManager.isRedoInProgress();
  if (undoOrRedo) {
    // allow undo/redo up until 'creation stamp' back in time
    // and check it after action is completed
    if (e.getDocument() == myOrigDocument) {
      //noinspection SSBasedInspection
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
          if (myOrigCreationStamp > myOrigDocument.getModificationStamp()) {
            closeEditor();
          }
        }
      });
    }
  }
  else if (e.getDocument() == myNewDocument) {
    commitToOriginal();
  }
  else if (e.getDocument() == myOrigDocument) {
    if (myCommittingToOriginal || myAltFullRange != null && myAltFullRange.isValid()) return;
    closeEditor();
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:QuickEditHandler.java

示例3: isUndoRedoInProgress

import com.intellij.openapi.command.undo.UndoManager; //导入方法依赖的package包/类
public boolean isUndoRedoInProgress() {
  UndoManager undoManager = UndoManager.getInstance(getProject());
  return undoManager.isUndoInProgress() || undoManager.isRedoInProgress();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GuiEditor.java

示例4: isUndoOrRedo

import com.intellij.openapi.command.undo.UndoManager; //导入方法依赖的package包/类
private static boolean isUndoOrRedo(@NotNull final Project project) {
  final UndoManager undoManager = UndoManager.getInstance(project);
  return undoManager.isUndoInProgress() || undoManager.isRedoInProgress();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:SvnFileSystemListener.java

示例5: isUndoRedoInProgress

import com.intellij.openapi.command.undo.UndoManager; //导入方法依赖的package包/类
public boolean isUndoRedoInProgress()
{
	UndoManager undoManager = UndoManager.getInstance(getProject());
	return undoManager.isUndoInProgress() || undoManager.isRedoInProgress();
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:6,代码来源:GuiEditor.java


注:本文中的com.intellij.openapi.command.undo.UndoManager.isRedoInProgress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。