Main Content

move

Record move or rename of factory setting or group

Description

move(upgrader,source,destination) records the move of a factory setting or settings group within a factory settings tree. You also can use the move function to record the rename of a factory setting or group. Recording changes to the factory settings tree for each toolbox version ensures that users upgrading to a new version of a toolbox do not have backward incompatibility issues with their settings.

example

Examples

collapse all

Create a matlab.settings.SettingsFileUpgrader object and record the move of a settings group in the second version of a toolbox.

Create a matlab.settings.SettingsFileUpgrader object for version 2 of mytoolbox.

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

Record the move of the settings group fonts from the mytoolbox factory settings group to the mytoolbox.mysettings group.

move(upgrader,'mytoolbox.fonts','mytoolbox.mysettings.fonts');

Create a matlab.settings.SettingsFileUpgrader object and record the rename of a setting in the second version of a toolbox.

Create a matlab.settings.SettingsFileUpgrader object for version 2 of mytoolbox.

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

Record the rename of the setting MySetting to MyUpdatedSetting and the move of the setting from the mytoolbox group to the mytoolbox.mysettings group.

move(upgrader,'mytoolbox.MySetting','mytoolbox.mysettings.MyUpdatedSetting');

Input Arguments

collapse all

Settings file upgrader, specified as a matlab.settings.SettingsFileUpgrader object.

Source path of setting or settings group, specified as a character vector or string. Specify the full source path of the setting or group, starting from the toolbox factory settings group and including the setting or group name.

Example: move(upgrader,'mytoolbox.MySetting','mytoolbox.MyUpdatedSetting');

Destination path of setting or settings group, specified as a character vector or string scalar. Specify the full destination path of the setting or group, starting from the toolbox factory settings group and including the setting or group name.

Example: move(upgrader,'mytoolbox.MySetting','mytoolbox.MyUpdatedSetting');

Version History

Introduced in R2019b