package jetbrains.mps.debugger.java.runtime.engine.concurrent;

/*Generated by MPS */

import jetbrains.mps.annotations.GeneratedClass;
import jetbrains.mps.baseLanguage.closures.runtime._FunctionTypes;

@GeneratedClass(node = "r:4abf334f-133f-4ef7-b458-4b8344e952fb(jetbrains.mps.debugger.java.runtime.engine.concurrent)/6520954994829104397", model = "r:4abf334f-133f-4ef7-b458-4b8344e952fb(jetbrains.mps.debugger.java.runtime.engine.concurrent)")
public class Commands {
  public Commands() {
  }
  public static IManagerCommand fromClosure(final _FunctionTypes._void_P0_E0 command) {
    return new ManagerCommand() {
      @Override
      public void invoke() {
        command.invoke();
      }
    };
  }
  public static IManagerCommand fromClosure(final _FunctionTypes._void_P0_E0 command, final _FunctionTypes._void_P0_E0 cancel) {
    return new ManagerCommand() {
      @Override
      public void invoke() {
        command.invoke();
      }
      @Override
      public void cancel() {
        cancel();
      }
    };
  }
  public static abstract class ManagerCommand implements IManagerCommand {
    public ManagerCommand() {
    }
    @Override
    public void cancel() {
    }
  }
}
