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


Java RunnableAdapter类代码示例

本文整理汇总了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();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:IntegrationTestCase.java

示例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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:BasicsTest.java

示例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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:ActionsTest.java

示例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();
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:IntegrationTestCase.java


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