MCPcopy
hub / github.com/dotnet/vscode-csharp / MigrateOptions

Function MigrateOptions

src/shared/migrateOptions.ts:109–132  ·  view source on GitHub ↗
(vscode: vscode)

Source from the content-addressed store, hash-verified

107];
108
109export async function MigrateOptions(vscode: vscode): Promise<void> {
110 const configuration = vscode.workspace.getConfiguration();
111 for (const { oldName, newName } of migrateOptions) {
112 if (!configuration.has(oldName)) {
113 continue;
114 }
115
116 const inspectionValueOfNewOption = configuration.inspect(newName);
117 if (inspectionValueOfNewOption == undefined) {
118 continue;
119 }
120
121 const newOptionValue = configuration.get(newName);
122 if (newOptionValue == undefined) {
123 continue;
124 }
125
126 if (shouldMove(newOptionValue, inspectionValueOfNewOption.defaultValue)) {
127 await MoveOptionsValue(oldName, newName, configuration);
128 }
129 }
130
131 await migrateDotnetPathOption(vscode);
132}
133
134async function migrateDotnetPathOption(vscode: vscode): Promise<void> {
135 const configuration = vscode.workspace.getConfiguration();

Callers 2

activateFunction · 0.90

Calls 6

shouldMoveFunction · 0.85
MoveOptionsValueFunction · 0.85
migrateDotnetPathOptionFunction · 0.85
hasMethod · 0.65
inspectMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected