trait ModelTracker extends AnyRef
This trait holds the state of the workspace with respect to various facets related to (but external from) the model. These include:
- the model path
- the model file name
- the model type (new, library, "normal")
At some point in the future this trait *could* be modified to hold the model itself. At the moment, that bit of state is handled by ModelSaver, but only because nothing in the workspace needs it directly. RG 5/12/16
- Source
- ModelTracker.scala
- Alphabetic
- By Inheritance
- ModelTracker
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def compiler: CompilerInterface
- abstract def getExtensionManager(): ExtensionManager
Concrete Value Members
-
val
_modelFileName: String
name of the currently loaded model.
name of the currently loaded model. Will be null if this is a new (unsaved) model. To get a version for display to the user, see modelNameForDisplay(). This is NOT a full path name, however, it does end in ".nlogo".
-
def
convertToNormal(): String
instantly converts the current model to ModelTypeJ.NORMAL.
instantly converts the current model to ModelTypeJ.NORMAL. This is used by the edit command to enable quick saving of library models. It shouldn't be used anywhere else.
- Annotations
- @throws( classOf[IOException] )
- val fileManager: FileManager
-
def
forceSaveAs: Boolean
whether the user needs to enter a new filename to save this model.
whether the user needs to enter a new filename to save this model. We need to do a "save as" if the model is new, from the models library, or converted.
Basically, only normal models can get silently saved.
-
def
getModelDir: String
returns the full path to the directory from which the current model was loaded.
returns the full path to the directory from which the current model was loaded. May be null if, for example, this is a new model.
-
def
getModelFileName: String
returns the name of the file from which the current model was loaded.
returns the name of the file from which the current model was loaded. May be null if, for example, this is a new model.
- def getModelFileUri: Option[URI]
-
def
getModelPath: String
returns the full pathname of the currently loaded model, if any.
returns the full pathname of the currently loaded model, if any. This may return null in some cases, for instance if this is a new model.
- def getModelType: ModelType
- def modelFileName: String
- def modelNameForDisplay: String
- def setModelPath(modelPath: String): Unit
- def setModelType(tpe: ModelType): Unit