package jetbrains.jetpad.base.edt;

import jetbrains.jetpad.base.Value;

public class EDT {
  public static Runnable validateInEDT(final EventDispatchThread validateOn, final Runnable validator) {
    final Value<Boolean> valid = new Value<>(true);

    final Runnable edtValidator = new Runnable() {
      @Override
      public void run() {
        if (valid.get()) return;

        validator.run();
        valid.set(true);
      }
    };

    return new Runnable() {
      @Override
      public void run() {
        valid.set(false);
        validateOn.schedule(edtValidator);
      }
    };
  }
}

@@ -121,18 +121,18 @@
 idateInE
-DT
+dt
 (final E
@@ -369,17 +369,16 @@
 return;%0A
-%0A
         

replace EDT with Edt in method names and class names except util class EDT