Main Content

matlab.settings.SettingsFileUpgrader

Version-specific changes in factory settings tree of toolbox

Description

Amatlab.settings.SettingsFileUpgraderobject represents the changes in the factory settings tree for a specific version of a toolbox. Create aSettingsFileUpgraderfor each toolbox version that includes a change to the factory settings tree and record the changes to the tree. Recording changes ensures that toolbox users upgrading to a new version do not have any backward incompatibility issues with their toolbox settings.

Creation

Description

example

upgrader= matlab.settings.SettingsFileUpgrader(version)creates aSettingsFileUpgraderobject for the specified toolbox version.

Input Arguments

expand all

Toolbox version to create aSettingsFileUpgraderobject for, specified as a character vector or string.

Example:"mytoolbox_Version1"

Properties

expand all

Toolbox version of theSettingsFileUpgraderobject, specified as a string.

Object Functions

move Record move or rename of factory setting or group
remove Record removal of factory setting or group

Examples

collapse all

Record changes to the factory settings tree that occurred in two different versions of a toolbox.

Create a settings file upgrader object for version 2 ofmytoolbox.

upgraders = matlab.settings.SettingsFileUpgrader('Version2');

Record the move of the settings group font from themytoolbox.mysettingsfactory settings group to themytoolboxgroup.

move(upgraders,“mytoolbox.mysettings.font','mytoolbox.font');

Create a settings file upgrader object for version 3 ofmytoolbox.

upgraders(2) = matlab.settings.SettingsFileUpgrader(“Version3”);

Record the rename of the two font settingsFontSizeandFontColor, previously namedMyFontNameandMyFontColor.

move(upgraders(2),'mytoolbox.font.MyFontSize','mytoolbox.font.FontSize'); move(upgraders(2),'mytoolbox.font.MyFontColor','mytoolbox.font.FontColor');

Version History

Introduced in R2019b