Package org.jetbrains.mps.openapi.model
Interface SaveOptions
-
public interface SaveOptions
Seems 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 class
SaveOptions.SaveOptionsBuilder
-
Field Summary
Fields Modifier and Type Field Description static SaveOptions
FORCE_SAVE
static SaveOptions
FORCE_SAVE_MEMORY
static SaveOptions
FORCE_SAVE_WITH_RESOLVE_INFO
static SaveOptions
LEGACY
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
forceSave()
default boolean
preloadModel()
default boolean
refreshDataSource()
default boolean
resolveConflicts()
default boolean
updateResolveInfoInRefs()
-
-
-
Field Detail
-
LEGACY
static final SaveOptions LEGACY
-
FORCE_SAVE
static final SaveOptions FORCE_SAVE
-
FORCE_SAVE_MEMORY
static final SaveOptions FORCE_SAVE_MEMORY
-
FORCE_SAVE_WITH_RESOLVE_INFO
static final SaveOptions FORCE_SAVE_WITH_RESOLVE_INFO
-
-
Method Detail
-
refreshDataSource
default boolean refreshDataSource()
- Returns:
- true if the implementation of EditableSModel needs to refresh the data source before saving the data to the data source
-
updateResolveInfoInRefs
default boolean updateResolveInfoInRefs()
- Returns:
- true if the implementation of EditableSModel needs to rebuild all resolve-info in all references
-
forceSave
default boolean forceSave()
- Returns:
- true if the implementation does #load -> #setChanged(false) -> #save() sequence of calls if true then the return of #preloadModel is ignored
-
resolveConflicts
default boolean resolveConflicts()
-
preloadModel
default boolean preloadModel()
- Returns:
- true if the EditableSModel implementation must load model (
SModel.load()
) before saving it
-
-