@NotNull public static SQFCommandExpression createPrivateDeclFromExisting(@NotNull Project project,@NotNull SQFPrivateDecl decl,@NotNull String... varNames){
  List<SQFPrivateDeclVar> declVars=decl.getPrivateVars();
  String text="private [";
  for (  SQFPrivateDeclVar declVar : declVars) {
    text+="\"" + declVar.getVarName() + "\",";
  }
  for (int i=0; i < varNames.length; i++) {
    text+="\"" + varNames[i] + (i != varNames.length - 1 ? "\"," : "\"];");
  }
  return (SQFCommandExpression)createElement(project,text,SQFTypes.COMMAND_EXPRESSION);
}

@ NotNull public static SQFCommandExpression createPrivateDeclFromExisting ( @ NotNull Project project , @ NotNull SQFPrivateDecl decl , @ NotNull String ... varNames ) { List < SQFPrivateDeclVar > declVars = decl . getPrivateVars ( ) ; String text = "private [" ; for ( SQFPrivateDeclVar declVar : declVars ) { text += "\"" + declVar . getVarName ( ) + "\"," ; } for ( int i = 0 ; i < varNames . length ; i ++ ) { text += "\"" + varNames [ i ] + ( i != varNames . length - 1 ? "\"," : "\"];" ) ; } return ( SQFCommandExpression ) createElement ( project , text , SQFTypes . COMMAND_EXPRESSION ) ; }
creates a new sqfcommandexpression that is a private [ ] syntax with new vars appended and returns it
