@Override
  protected void runTest() throws Throwable {
    if (getTestName(false).contains("NoVerify")) {
      super.runTest();
      return;
    }
    boolean oldVerify = RedBlackTree.VERIFY;
    RedBlackTree.VERIFY = !isPerformanceTest();
    final Throwable[] ex = {null};
    try {
      if (getTestName(false).contains("NoCommand")) {
        super.runTest();
        return;
      }
      WriteCommandAction.runWriteCommandAction(
          getProject(),
          new ThrowableComputable<Void, Throwable>() {
            @Override
            public Void compute() throws Throwable {
              RangeMarkerTest.super.runTest();
              return null;
            }
          });
    } finally {
      RedBlackTree.VERIFY = oldVerify;
    }

    if (ex[0] != null) throw ex[0];
  }
  @Override
  public void tearDown() throws Exception {
    Project project = getProject();
    LightPlatformTestCase.doTearDown(project, myApplication, false);

    for (ModuleFixtureBuilder moduleFixtureBuilder : myModuleFixtureBuilders) {
      moduleFixtureBuilder.getFixture().tearDown();
    }
    UIUtil.invokeAndWaitIfNeeded(
        new Runnable() {
          @Override
          public void run() {
            ApplicationManager.getApplication()
                .runWriteAction(
                    new Runnable() {
                      @Override
                      public void run() {
                        Disposer.dispose(myProject);
                        myProject = null;
                      }
                    });
          }
        });

    for (final File fileToDelete : myFilesToDelete) {
      boolean deleted = FileUtil.delete(fileToDelete);
      assert deleted : "Can't delete " + fileToDelete;
    }

    super.tearDown();

    myEditorListenerTracker.checkListenersLeak();
    myThreadTracker.checkLeak();
    LightPlatformTestCase.checkEditorsReleased();
    InjectedLanguageManagerImpl.checkInjectorsAreDisposed(project);
  }
 protected void enableInspectionTool(@NotNull InspectionProfileEntry tool) {
   InspectionToolWrapper toolWrapper = InspectionToolRegistrar.wrapTool(tool);
   LightPlatformTestCase.enableInspectionTool(getProject(), toolWrapper);
 }
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   documentManager = (PsiDocumentManagerImpl) PsiDocumentManager.getInstance(getProject());
   synchronizer = documentManager.getSynchronizer();
 }