private void performAction(
      String from,
      String to,
      final int docCommentPolicy,
      String[] expectedConflicts,
      final String[] toPullUp) {
    final JSClassResolver resolver =
        JSDialectSpecificHandlersFactory.forLanguage(JavaScriptSupportLoader.ECMA_SCRIPT_L4)
            .getClassResolver();
    final JSClass sourceClass =
        (JSClass) resolver.findClassByQName(from, GlobalSearchScope.projectScope(getProject()));
    assertNotNull("source class not found: " + sourceClass, sourceClass);

    final JSClass targetClass =
        (JSClass) resolver.findClassByQName(to, GlobalSearchScope.projectScope(getProject()));
    assertNotNull("target class not found: " + targetClass, targetClass);

    assertTrue(
        "Source should be a subclass of target",
        JSInheritanceUtil.isParentClass(sourceClass, targetClass));

    final List<JSMemberInfo> memberInfos = getMemberInfos(toPullUp, sourceClass, false);

    final JSMemberInfo[] infosArray =
        JSMemberInfo.getSelected(memberInfos, sourceClass, Conditions.<JSMemberInfo>alwaysTrue());
    MultiMap<PsiElement, String> conflicts =
        JSPullUpConflictsUtil.checkConflicts(
            infosArray,
            sourceClass,
            targetClass,
            new JSInterfaceContainmentVerifier() {
              @Override
              public boolean checkedInterfacesContain(JSFunction psiMethod) {
                return JSPullUpHelper.checkedInterfacesContain(memberInfos, psiMethod);
              }
            },
            JSVisibilityUtil.DEFAULT_OPTIONS);

    ArrayList<String> messages = new ArrayList<String>(conflicts.values());
    for (int i = 0; i < messages.size(); i++) {
      messages.set(i, messages.get(i).replaceAll("<[^>]+>", ""));
    }
    assertSameElements(messages, expectedConflicts);
    if (conflicts.isEmpty()) {
      WriteCommandAction.runWriteCommandAction(
          null,
          new Runnable() {
            public void run() {
              new JSPullUpHelper(sourceClass, targetClass, infosArray, docCommentPolicy)
                  .moveMembersToBase();
              myProject.getComponent(PostprocessReformattingAspect.class).doPostponedFormatting();
            }
          });

      FileDocumentManager.getInstance().saveAllDocuments();
    }
  }
 protected void buildTemplate(final Template template, final JSClass jsClass) {
   if (JSInheritanceUtil.findMember(
           "tearDown",
           jsClass,
           JSInheritanceUtil.SearchedMemberType.Methods,
           JSFunction.FunctionKind.SIMPLE,
           true)
       != null) {
     template.addTextSegment(
         "[After]\npublic override function tearDown():void{\nsuper.tearDown();");
     template.addEndVariable();
     template.addTextSegment("\n}");
   } else {
     template.addTextSegment("[After]\npublic function tearDown():void{\n");
     template.addEndVariable();
     template.addTextSegment("\n}");
   }
 }
 public boolean isFlunitSuiteSubclass(JSClass clazz) {
   return flunitTestSuite != null && JSInheritanceUtil.isParentClass(clazz, flunitTestSuite);
 }
 public boolean isFlexUnit1SuiteSubclass(JSClass clazz) {
   return JSInheritanceUtil.isParentClass(clazz, flexUnit1TestSuite);
 }