All Downloads are FREE. Search and download functionalities are using the official Maven repository.

abellectl_2.12.1.0.0-RC3.source-code.Command.scala Maven / Gradle / Ivy

There is a newer version: 1.1.0-RC3
Show newest version
package info.hupel.isabelle.cli

import scala.concurrent._

import monix.execution.{Cancelable, CancelableFuture}

import org.log4s._

import info.hupel.isabelle.api._
import info.hupel.isabelle.setup.Setup

/**
 * Simple bundle of an Isabelle [[info.hupel.isabelle.setup.Setup setup]], a
 * matching [[info.hupel.isabelle.api.Environment environment]] and a requested
 * [[info.hupel.isabelle.api.Configuration configuration]].
 */
final case class Bundle(env: Environment, setup: Setup, configuration: Configuration)

trait Command {

  protected lazy val logger = getLogger(getClass)

  def run(bundle: Bundle, args: List[String])(implicit ec: ExecutionContext): Future[Unit] =
    cancelableRun(bundle, args)

  def cancelableRun(bundle: Bundle, args: List[String])(implicit ec: ExecutionContext): CancelableFuture[Unit] =
    CancelableFuture(run(bundle, args), Cancelable.empty)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy