class Controller extends ROController with ActionHandling with Logger
A Controller is the central class maintaining all MMT content and extensions.
Every application (e.g., Shell) typically creates one controller. The controller creates and owns one instance of many MMT clasess (see the documentation of the respective fields below).
It also maintains the MMTConfig and exectures Actions.
- Source
- Controller.scala
- Alphabetic
- By Inheritance
- Controller
- Logger
- ActionHandling
- LMHActionHandling
- PrintActionHandling
- MathPathActionHandling
- ExecActionHandling
- DefineActionHandling
- ControlActionHandling
- CheckActionHandling
- ArchiveActionHandling
- ROController
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Controller(report_: Report = new Report)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
add(nw: StructuralElement, at: AddPosition = AtEnd): Unit
adds a knowledge item
adds a knowledge item
- at
the position where it should be added (only inside modules, documents)
-
def
addArchive(root: File): List[Archive]
add an archive plus its optional classpath and notify listeners, handling AddArchive
add an archive plus its optional classpath and notify listeners, handling AddArchive
- Definition Classes
- MathPathActionHandling
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
backend: Backend
the interface to physical storgae
-
def
build(f: File)(implicit errorCont: ErrorHandler): Unit
builds a file/folder in an archive using an appropriate importer
-
def
buildArchive(ids: List[String], key: String, mod: BuildTargetModifier, in: FilePath): Unit
Builds a given target from an Archive, handling the ArchiveBuild Action
Builds a given target from an Archive, handling the ArchiveBuild Action
- Definition Classes
- ArchiveActionHandling
-
def
buildManager: BuildManager
runs build tasks
-
def
checkPath(p: Path, id: String)(implicit task: MMTTask): Unit
Checks a path using the Checker of the given ID, handling CheckAction
Checks a path using the Checker of the given ID, handling CheckAction
- Definition Classes
- CheckActionHandling
-
def
checkTerm(s: String): Unit
Checks a term relative to the current base path, handling CheckTerm
Checks a term relative to the current base path, handling CheckTerm
- Definition Classes
- CheckActionHandling
-
def
cleanup: Unit
releases all resources that are not handled by the garbage collection
-
def
clear: Unit
clears the state
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
complifier(rules: RuleSet): TermTransformer
applies only complification rules, used to unsimplify a fully-processed object, e.g., to undo definition expansion
-
def
configBuild(modS: String, targets: List[String], profile: String): Unit
Runs a given profile from a config file, handling the ConfBuild target
Runs a given profile from a config file, handling the ConfBuild target
- Definition Classes
- ArchiveActionHandling
-
def
currentActionDefinition: Option[String]
the name of the current action definition (if any)
the name of the current action definition (if any)
- Definition Classes
- ActionHandling
-
def
delete(p: Path): Unit
deletes a document or module from memory no change management, deletions are non-recursive, listeners are notified
-
val
depstore: RelStore
shortcut for the relational manager
- def detectChanges(elems: List[ContentElement]): StrictDiff
- def detectRefinements(diff: StrictDiff): List[String]
-
def
endAdd(c: ContainerElement[_]): Unit
called after adding all elements in the body of a container element
-
def
endDefine(): Unit
ends a definition
ends a definition
- Definition Classes
- DefineActionHandling
-
def
enterDefine(name: String): Unit
enters a definition of the given name
enters a definition of the given name
- Definition Classes
- DefineActionHandling
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
evaluator: QueryEvaluator
the query engine
-
val
extman: ExtensionManager
maintains all extensions
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(path: Path): StructuralElement
convenience for global lookup
convenience for global lookup
- Definition Classes
- Controller → ROController
-
def
getActionDefinitions: List[Defined]
- returns
the defined actions
- def getAs[E <: StructuralElement](cls: Class[E], path: Path): E
-
def
getBase: Path
- returns
the current base URI
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getConfig: MMTConfig
- returns
the current configuration
-
def
getConfigString(): String
returns a string expressing the current configuration
returns a string expressing the current configuration
- Definition Classes
- PrintActionHandling
- def getConstant(path: GlobalName): Constant
-
def
getContext(e: StructuralElement): Context
computes the context of an element, e.g., as needed for checking this methods allows processing individual elements without doing a top-down traversal to carry the context
-
def
getCurrentActionDefinition: Option[String]
- returns
the current action being defined or None
-
def
getDefinition(name: String): Option[Defined]
return the definition of a given name
return the definition of a given name
- Definition Classes
- DefineActionHandling
-
def
getDefinitions: List[Defined]
returns all known action definitions
returns all known action definitions
- Definition Classes
- DefineActionHandling
-
def
getDocument(path: DPath, msg: (Path) ⇒ String = p => "no document found at " + p): Document
- Definition Classes
- ROController
-
def
getEnvVar(name: String): Option[String]
- returns
the value of an environment variable
-
def
getExtraInnerContext(e: ContainerElement[_]): Context
additional context for checking the body of ContainerElement
-
def
getHome: File
- returns
the current home directory
-
def
getMathHub: Option[MathHub]
get the current MathHub, if any
get the current MathHub, if any
- Definition Classes
- LMHActionHandling
-
def
getNamespaceMap: NamespaceMap
- returns
the current namespace map
-
def
getO(path: Path): Option[StructuralElement]
like get
- def getTheory(path: MPath): Theory
-
def
getVersion: String
return the MMT version (from the jar)
-
val
globalLookup: LookupWithNotFoundHandler
a lookup that loads missing modules dynamically
a lookup that loads missing modules dynamically
- Definition Classes
- Controller → ROController
-
def
handle(message: Message): Response
processes a message, see web.MessageHandler
processes a message, see web.MessageHandler
- Definition Classes
- ActionHandling
-
def
handle(act: Action, showLog: Boolean = true): Unit
executes an Action
executes an Action
- Definition Classes
- ActionHandling
-
def
handleLine(l: String, showLog: Boolean = true): Unit
executes a string command
executes a string command
- Definition Classes
- ActionHandling
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iterate[A](a: ⇒ A): A
wrapping an expression in this method, evaluates the expression dynamically loading missing content
wrapping an expression in this method, evaluates the expression dynamically loading missing content
dependency cycles are detected be aware that the argument may be evaluated repeatedly
- a
this is evaluated until evaluation does not throw NotFound
- returns
the evaluation
-
val
library: Library
shortcut for the library
-
def
loadConfig(conf: MMTConfig, loadEverything: Boolean): Unit
integrate a configuration into the current state
- def loadConfigFile(f: File, loadEverything: Boolean): Unit
-
val
localLookup: LookupWithNotFoundHandler with FailingNotFoundHandler
a lookup that uses only the current memory data structures
a lookup that uses only the current memory data structures
- Definition Classes
- Controller → ROController
-
def
log(e: Error): Unit
logs an error - always logged
logs an error - always logged
- Attributes
- protected
- Definition Classes
- Logger
-
def
log(s: ⇒ String, subgroup: Option[String] = None): Unit
logs a message with this logger's logprefix
logs a message with this logger's logprefix
- Attributes
- protected
- Definition Classes
- Logger
-
def
logError(s: ⇒ String): Unit
log as an error message
log as an error message
- Attributes
- protected
- Definition Classes
- Logger
-
def
logGroup[A](a: ⇒ A): A
wraps around a group to create nested logging
wraps around a group to create nested logging
- Attributes
- protected
- Definition Classes
- Logger
-
val
logPrefix: String
- Definition Classes
- Controller → Logger
-
def
logTemp(s: ⇒ String): Unit
temporary logging - always logged
temporary logging - always logged
- Attributes
- protected
- Definition Classes
- Logger
-
val
memory: Memory
maintains all knowledge: structural elements, relational data, etc.
maintains all knowledge: structural elements, relational data, etc.
- Definition Classes
- Controller → ROController
-
def
navigate(p: Path): Unit
navigates to a given path, handling Navigate
navigates to a given path, handling Navigate
- Definition Classes
- CheckActionHandling
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
objectParser: ObjectParser
convenience for getting the default object parser
-
def
pragmatic: Pragmatics
converts between strict and pragmatic syntax using notations.NotationExtensions
-
def
presenter: Presenter
convenience for getting the default text-based presenter (for error messages, logging, etc.)
-
val
previousLocalLookup: LookupWithNotFoundHandler with FailingNotFoundHandler
a lookup that uses the previous in-memory version (ignoring the current one)
-
val
propagator: OccursInImpactPropagator
moc.propagator - handling change propagation
-
def
read(ps: ParsingStream, interpret: Boolean, mayImport: Boolean = false)(implicit errorCont: ErrorHandler): Document
parses a ParsingStream with an appropriate parser or interpreter and optionally checks it
parses a ParsingStream with an appropriate parser or interpreter and optionally checks it
- ps
the input
- interpret
if true, try to use an interpreter, not a parser
- mayImport
if true, use an importer as a fallback
- errorCont
continuation to be called on all encountered errors
- returns
the read Document
-
def
recognizeLiteral(rules: RuleSet, ul: UnknownOMLIT): Option[OMLIT]
convert an UnknownOMLIT to an OMLIT by choosing an applicable rule
-
val
refiner: PragmaticRefiner
moc.refiner - handling pragmatic changes in scope
-
val
relman: RelationalManager
relational manager, handles extracting and parsing relational elements
-
val
report: Report
handles all output and log messages
handles all output and log messages
- Definition Classes
- Controller → Logger
-
def
retrieve(nf: NotFound): Unit
loads a path via the backend and reports it
loads a path via the backend and reports it
- Attributes
- protected
-
def
runDefinition(file: Option[File], name: String): Unit
runs a given definition
runs a given definition
- Definition Classes
- DefineActionHandling
-
def
runMSLFile(f: File, nameOpt: Option[String]): Unit
runs a given file, handling ExecFile
runs a given file, handling ExecFile
- Definition Classes
- ExecActionHandling
-
var
server: Option[Server]
the http server
-
def
setBase(base: Path): Unit
set the base path of this Controller
set the base path of this Controller
- Definition Classes
- ControlActionHandling
-
def
setHome(h: File): Unit
sets the current home directory (relative to which path names in commands are executed)
-
def
simplifier: Simplifier
convenience for getting the default simplifier
-
val
state: ControllerState
all control state
all control state
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tryHandle(act: Action, showLog: Boolean = true): ActionResult
executes an Action without throwing exceptions
executes an Action without throwing exceptions
- Definition Classes
- ActionHandling
-
def
tryHandleLine(l: String, showLog: Boolean = true): ActionResult
executes an Action without throwing exceptions
executes an Action without throwing exceptions
- Definition Classes
- ActionHandling
- def update(diff: StrictDiff, withChanges: List[String] = Nil): Set[CPath]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
lazy val
winman: WindowManager
the window manager
Deprecated Value Members
-
def
make(key: String, allArgs: List[String]): Unit
Makes a given target, handling the MakeAction
Makes a given target, handling the MakeAction
- Definition Classes
- ArchiveActionHandling
- Annotations
- @MMT_TODO( message = ... )
- Deprecated
handled by the :make shell extension, use it instead