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


Java Reverter类代码示例

本文整理汇总了Java中com.intellij.history.integration.revertion.Reverter的典型用法代码示例。如果您正苦于以下问题:Java Reverter类的具体用法?Java Reverter怎么用?Java Reverter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Reverter类属于com.intellij.history.integration.revertion包,在下文中一共展示了Reverter类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: revert

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
protected void revert(Reverter r) {
  try {
    if (!askForProceeding(r)) return;

    List<String> errors = r.checkCanRevert();
    if (!errors.isEmpty()) {
      showError(message("message.cannot.revert.because", formatErrors(errors)));
      return;
    }
    r.revert();

    showNotification(r.getCommandName());
  }
  catch (IOException e) {
    showError(message("message.error.during.revert", e));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:HistoryDialog.java

示例2: testRevertChange

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
public void testRevertChange() throws IOException {
  getVcs().beginChangeSet();
  myRoot.createChildData(null, "f1.txt");
  getVcs().endChangeSet("change");

  getVcs().beginChangeSet();
  myRoot.createChildData(null, "f2.txt");
  getVcs().endChangeSet("another change");

  RecentChange c = getVcs().getRecentChanges(getRootEntry()).get(1);
  RecentChangeDialogModel m = new RecentChangeDialogModel(myProject, myGateway, getVcs(), c);

  Reverter r = m.createReverter();
  r.revert();

  assertNull(myRoot.findChild("f1.txt"));
  assertNotNull(myRoot.findChild("f2.txt"));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:RecentChangeDialogTest.java

示例3: askForProceeding

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
private boolean askForProceeding(Reverter r) throws IOException {
  List<String> questions = r.askUserForProceeding();
  if (questions.isEmpty()) return true;

  return Messages.showYesNoDialog(myProject, message("message.do.you.want.to.proceed", formatQuestions(questions)),
                                  CommonBundle.getWarningTitle(), Messages.getWarningIcon()) == Messages.YES;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:HistoryDialog.java

示例4: testRevert

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
public void testRevert() throws IOException {
  initModelOnSecondLineAndSelectRevisions(0, 0);
  Reverter r = m.createReverter();
  r.revert();

  assertEquals("a\nbc\ne\n", new String(f.contentsToByteArray()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:SelectionHistoryDialogTest.java

示例5: initModelFor

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
private void initModelFor() {
  m = new HistoryDialogModel(myProject, myGateway, getVcs(), f) {
    @Override
    public Reverter createReverter() {
      throw new UnsupportedOperationException();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:HistoryDialogModelTest.java

示例6: askForProceeding

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
private boolean askForProceeding(Reverter r) throws IOException {
  List<String> questions = r.askUserForProceeding();
  if (questions.isEmpty()) return true;

  return Messages.showYesNoDialog(myProject, message("message.do.you.want.to.proceed", formatQuestions(questions)),
                                  CommonBundle.getWarningTitle(), Messages.getWarningIcon()) == 0;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:HistoryDialog.java

示例7: createReverter

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
@Override
public Reverter createReverter() {
  return new SelectionReverter(myProject, myVcs, myGateway, getCalculator(), getLeftRevision(), getRightEntry(), myFrom, myTo);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:SelectionHistoryDialogModel.java

示例8: createReverter

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
@Override
public Reverter createReverter() {
  Revision l = getLeftRevision();
  Revision r = getRightRevision();
  return new DifferenceReverter(myProject, myVcs, myGateway, l.getDifferencesWith(r), l);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:FileHistoryDialogModel.java

示例9: createReverter

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
@Override
public Reverter createReverter() {
  return createRevisionReverter(getDifferences());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DirectoryHistoryDialogModel.java

示例10: createRevisionReverter

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
public Reverter createRevisionReverter(List<Difference> diffs) {
  return new DifferenceReverter(myProject, myVcs, myGateway, diffs, getLeftRevision());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:DirectoryHistoryDialogModel.java

示例11: createReverter

import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
public abstract Reverter createReverter(); 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:2,代码来源:HistoryDialogModel.java


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