Java 类com.intellij.psi.impl.DocumentCommitThread 实例源码

项目:intellij-ce-playground    文件:PlatformTestCase.java   
private void disposeProject(@NotNull List<Throwable> exceptions) {
  try {
    DocumentCommitThread.getInstance().clearQueue();
    // sometimes SwingUtilities maybe confused about EDT at this point
    if (SwingUtilities.isEventDispatchThread()) {
      UIUtil.dispatchAllInvocationEvents();
    }
  }
  catch (Throwable e) {
    exceptions.add(e);
  }

  Project project = myProject;
  if (project == null) {
    return;
  }

  closeAndDisposeProjectAndCheckThatNoOpenProjects(project, exceptions);
  myProject = null;
}
项目:intellij-ce-playground    文件:PlatformTestCase.java   
@Override
protected void setUp() throws Exception {
  super.setUp();
  if (ourTestCase != null) {
    String message = "Previous test " + ourTestCase + " hasn't called tearDown(). Probably overridden without super call.";
    ourTestCase = null;
    fail(message);
  }
  IdeaLogger.ourErrorsOccurred = null;

  LOG.info(getClass().getName() + ".setUp()");

  initApplication();

  myEditorListenerTracker = new EditorListenerTracker();
  myThreadTracker = new ThreadTracker();

  setUpProject();

  storeSettings();
  ourTestCase = this;
  if (myProject != null) {
    ProjectManagerEx.getInstanceEx().openTestProject(myProject);
    CodeStyleSettingsManager.getInstance(myProject).setTemporarySettings(new CodeStyleSettings());
    InjectedLanguageManagerImpl.pushInjectors(getProject());
  }

  DocumentCommitThread.getInstance().clearQueue();
  UIUtil.dispatchAllInvocationEvents();
}
项目:tools-idea    文件:PlatformTestCase.java   
@Override
protected void setUp() throws Exception {
  super.setUp();
  if (ourTestCase != null) {
    String message = "Previous test " + ourTestCase + " hasn't called tearDown(). Probably overridden without super call.";
    ourTestCase = null;
    fail(message);
  }
  IdeaLogger.ourErrorsOccurred = null;

  LOG.info(getClass().getName() + ".setUp()");

  initApplication();

  myEditorListenerTracker = new EditorListenerTracker();
  myThreadTracker = new ThreadTracker();

  setUpProject();

  storeSettings();
  ourTestCase = this;
  if (myProject != null) {
    ProjectManagerEx.getInstanceEx().openTestProject(myProject);
    CodeStyleSettingsManager.getInstance(myProject).setTemporarySettings(new CodeStyleSettings());
    InjectedLanguageManagerImpl.pushInjectors(getProject());
  }

  DocumentCommitThread.getInstance().clearQueue();
}