private PsiElement generateHandlerFromParams(
      Project project, JSFile file, String signalHandlerName, JSArgumentList signalParams) {
    JSClass jsClass = JSPsiImplUtils.findClass(file);

    importClassesFromParameters(signalParams, jsClass);

    String result = SignalsUtils.buildParametersFromClassParameters(signalParams.getText());

    ASTNode jsTreeFromText =
        JSChangeUtil.createJSTreeFromText(
            project,
            "protected function " + signalHandlerName + result + ":void{" + "" + "\n}\n",
            JavaScriptSupportLoader.ECMA_SCRIPT_L4);

    final PsiElement functionElement = jsTreeFromText.getPsi();

    return jsClass.add(functionElement);
  }
  public ActionScriptAccessibilityProcessingHandler(
      @Nullable PsiElement _place, boolean skipNsResolving) {
    super(_place);

    if (place instanceof JSReferenceExpression) {
      final JSReferenceExpression namespace = ((JSReferenceExpression) place).getNamespaceElement();

      // TODO: e.g. protected is also ns
      if (namespace != null) {
        String ns =
            skipNsResolving ? namespace.getText() : JSPsiImplUtils.calcNamespaceReference(place);
        if (ns != null) {
          openedNses = new THashMap<String, String>(1);
          openedNses.put(ns, null);
          defaultNsIsNotAllowed = true;
        } else {
          anyNsAllowed = true;
        }
      }
    }
  }