Package org.jetbrains.mps.openapi.model
Interface SaveOptions
-
public interface SaveOptionsSeems like we might want save the model differently in different scenarios. This interface is the description of the parameters of EditableSModel#save.- See Also:
EditableSModel.save(SaveOptions),for construction
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSaveOptions.SaveOptionsBuilder
-
Field Summary
Fields Modifier and Type Field Description static SaveOptionsFORCEstatic SaveOptionsLEGACY
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanforce()default booleanpreloadModelIfNeeded()booleanrefreshDataSource()
-
-
-
Field Detail
-
LEGACY
static final SaveOptions LEGACY
-
FORCE
static final SaveOptions FORCE
-
-
Method Detail
-
refreshDataSource
boolean refreshDataSource()
- Returns:
- true iff the implementation of EditableSModel needs to refresh the data source before saving the data to the data source
-
force
default boolean force()
- Returns:
- true then the EditableSModel implementation does not consider the changes coming
from the
SModel.getSource(), always choosing the current model data; and the implementation does not considerEditableSModel.isChanged()flag as well. if false then the implementation is free to choose betweenSModel.getSource()and internal data. The resulting model must beEditableSModel.isChanged()= false and the content is either equal to the current data or the new loaded data fromSModel.getSource()
-
preloadModelIfNeeded
default boolean preloadModelIfNeeded()
- Returns:
- true if the EditableSModel implementation must load model (
SModel.load()) before saving it
-
-