本文整理汇总了Java中com.intellij.history.utils.RunnableAdapter类的典型用法代码示例。如果您正苦于以下问题:Java RunnableAdapter类的具体用法?Java RunnableAdapter怎么用?Java RunnableAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RunnableAdapter类属于com.intellij.history.utils包,在下文中一共展示了RunnableAdapter类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import com.intellij.history.utils.RunnableAdapter; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
super.setUp();
LocalHistoryImpl.getInstanceImpl().cleanupForNextTest();
Clock.reset();
Paths.useSystemCaseSensitivity();
myGateway = new IdeaGateway();
ApplicationManager.getApplication().runWriteAction(new RunnableAdapter() {
@Override
public void doRun() throws Exception {
setUpInWriteAction();
}
});
}
示例2: testProcessingCommands
import com.intellij.history.utils.RunnableAdapter; //导入依赖的package包/类
public void testProcessingCommands() throws Exception {
final VirtualFile[] f = new VirtualFile[1];
CommandProcessor.getInstance().executeCommand(myProject, new RunnableAdapter() {
@Override
public void doRun() throws IOException {
f[0] = myRoot.createChildData(null, "f1.txt");
f[0].setBinaryContent(new byte[]{1});
f[0].setBinaryContent(new byte[]{2});
}
}, "name", null);
assertEquals(2, getRevisionsFor(f[0]).size());
}
示例3: testActionInsideCommandSurroundedWithSomeChanges
import com.intellij.history.utils.RunnableAdapter; //导入依赖的package包/类
public void testActionInsideCommandSurroundedWithSomeChanges() throws Exception {
// see testActionInsideCommand comment
final VirtualFile f = createFile("f.txt");
CommandProcessor.getInstance().executeCommand(myProject, new RunnableAdapter() {
@Override
public void doRun() throws IOException {
setContent(f, "file");
setDocumentTextFor(f, "doc1");
LocalHistoryAction a = LocalHistory.getInstance().startAction("action");
setDocumentTextFor(f, "doc2");
a.finish();
saveDocument(f);
setContent(f, "doc3");
}
}, "command", null);
List<Revision> rr = getRevisionsFor(f);
assertEquals(4, rr.size());
assertContent("doc3", rr.get(0).findEntry());
assertContent("doc1", rr.get(1).findEntry());
assertContent("", rr.get(2).findEntry());
assertEquals("command", rr.get(1).getChangeSetName());
assertNull(rr.get(2).getChangeSetName());
}
示例4: setUp
import com.intellij.history.utils.RunnableAdapter; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
super.setUp();
Clock.reset();
Paths.useSystemCaseSensitivity();
myGateway = new IdeaGateway();
ApplicationManager.getApplication().runWriteAction(new RunnableAdapter() {
@Override
public void doRun() throws Exception {
setUpInWriteAction();
}
});
}