public static void setBoolean(SNode node, String propertyName, boolean value) {
   if (node != null) {
     SNode conceptProperty = (SNode) findProperty(node, propertyName);
     if (SNodeOperations.isInstanceOf(
             conceptProperty, "jetbrains.mps.lang.structure.structure.BooleanConceptProperty")
         && !(value)) {
       node.removeChild(conceptProperty);
     } else if (conceptProperty == null && value) {
       for (SNode cpd : (List<SNode>) SModelSearchUtil.getConceptPropertyDeclarations(node)) {
         if (SPropertyOperations.getString(cpd, "name").equals(propertyName)) {
           if (SNodeOperations.isInstanceOf(
               cpd, "jetbrains.mps.lang.structure.structure.BooleanConceptPropertyDeclaration")) {
             SNode bcp =
                 SModelOperations.createNewNode(
                     SNodeOperations.getModel(node),
                     null,
                     "jetbrains.mps.lang.structure.structure.BooleanConceptProperty");
             SLinkOperations.setTarget(
                 bcp,
                 "conceptPropertyDeclaration",
                 SNodeOperations.cast(
                     cpd,
                     "jetbrains.mps.lang.structure.structure.BooleanConceptPropertyDeclaration"),
                 false);
             ListSequence.fromList(SLinkOperations.getTargets(node, "conceptProperty", true))
                 .addElement(bcp);
             break;
           }
         }
       }
     }
   }
 }