本文整理汇总了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));
}
}
示例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"));
}
示例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;
}
示例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()));
}
示例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();
}
};
}
示例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;
}
示例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);
}
示例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);
}
示例9: createReverter
import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
@Override
public Reverter createReverter() {
return createRevisionReverter(getDifferences());
}
示例10: createRevisionReverter
import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
public Reverter createRevisionReverter(List<Difference> diffs) {
return new DifferenceReverter(myProject, myVcs, myGateway, diffs, getLeftRevision());
}
示例11: createReverter
import com.intellij.history.integration.revertion.Reverter; //导入依赖的package包/类
public abstract Reverter createReverter();