@Override
  public PsiLanguageInjectionHost updateText(@NotNull String text) {
    ASTNode node = getNode();
    ASTNode parent = node.getTreeParent();
    final HaxeVarDeclarationPart varDeclarationPart =
        HaxeElementGenerator.createVarDeclarationPart(getProject(), "a=" + text);
    final HaxeVarInit varInit = varDeclarationPart.getVarInit();
    final ASTNode outerNode = varInit == null ? null : varInit.getNode();
    assert outerNode != null;
    parent.replaceChild(node, outerNode);

    return (PsiLanguageInjectionHost) outerNode.getPsi();
  }
  @Override
  protected void modifyElement(HaxeNamedComponent namedComponent) {
    if (!(namedComponent instanceof HaxeVarDeclarationPart)) {
      return;
    }
    if (((HaxeVarDeclarationPart) namedComponent).getPropertyDeclaration() != null) {
      // todo: modify
      return;
    }

    final HaxeVarDeclarationPart declarationPart =
        HaxeElementGenerator.createVarDeclarationPart(
            namedComponent.getProject(), buildVarDeclaration(namedComponent.getName()));
    final HaxePropertyDeclaration propertyDeclaration = declarationPart.getPropertyDeclaration();
    if (propertyDeclaration != null) {
      namedComponent.addAfter(propertyDeclaration, namedComponent.getComponentName());
    }
  }