nameMatches

saveAs

Saves the selected profile, including changes, under a new name. There are three cases:

the name does not actually change: changes are applied to the selected profile;

the name changes and no existing profile has the same name: a new profile is created incorporating the changes, the changes to the selected profile are reverted, and the new profile is selected;

the name changes and an existing profile has the same name: the existing profile is reset from the selected profile, including changes, the changes to the selected profile are reverted; and the overwritten profile is selected.

Parameters:

newName - The new name of the profile.

overwrittenProfile - The profile that will be overwritten, or null if none.

importAs

the name does not actually change: changes are applied to the selected profile;

the name changes and no existing profile has the same name: a new profile is created incorporating the changes, the changes to the selected profile are reverted, and the new profile is selected;

the name changes and an existing profile has the same name: the existing profile is reset from the selected profile, including changes, the changes to the selected profile are reverted; and the overwritten profile is selected.

Parameters:

newName - The new name of the profile.

overwrittenProfile - The profile that will be overwritten, or null if none.