Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
radurentea committed Oct 28, 2024
1 parent c8f9ec8 commit 0fa8e6c
Showing 1 changed file with 29 additions and 58 deletions.
87 changes: 29 additions & 58 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,35 @@ export async function activate(context: vscode.ExtensionContext) {
);
if (statusBarItems && statusBarItems["port"]) {
statusBarItems["port"].text =
"$(plug) " + idfConf.readParameter("idf.port", workspaceRoot);
`$(${
commandDictionary[CommandKeys.SelectSerialPort].iconId
}) ` + idfConf.readParameter("idf.port", workspaceRoot);
}
if (statusBarItems["projectConf"]) {
statusBarItems["projectConf"].dispose();
statusBarItems["projectConf"] = undefined;
const selectedConfig = ESP.ProjectConfiguration.store.get<string>(
ESP.ProjectConfiguration.SELECTED_CONFIG
);
ESP.ProjectConfiguration.store.clear(selectedConfig);
ESP.ProjectConfiguration.store.clear(
ESP.ProjectConfiguration.SELECTED_CONFIG
);
}
const currentIdfSetup = await getCurrentIdfSetup(
workspaceRoot,
false
);
if (statusBarItems["currentIdfVersion"]) {
statusBarItems["currentIdfVersion"].text = currentIdfSetup.isValid
? `$(${
commandDictionary[CommandKeys.SelectCurrentIdfVersion]
.iconId
}) ESP-IDF v${currentIdfSetup.version}`
: `$(${
commandDictionary[CommandKeys.SelectCurrentIdfVersion]
.iconId
}) ESP-IDF InvalidSetup`;
}
const coverageOptions = getCoverageOptions(workspaceRoot);
covRenderer = new CoverageRenderer(workspaceRoot, coverageOptions);
Expand All @@ -417,35 +445,6 @@ export async function activate(context: vscode.ExtensionContext) {
workspaceRoot,
statusBarItems["target"]
);
if (statusBarItems && statusBarItems["port"]) {
statusBarItems["port"].text =
`$(${commandDictionary[CommandKeys.SelectSerialPort].iconId}) ` +
idfConf.readParameter("idf.port", workspaceRoot);
}
if (statusBarItems["projectConf"]) {
statusBarItems["projectConf"].dispose();
statusBarItems["projectConf"] = undefined;
const selectedConfig = ESP.ProjectConfiguration.store.get<string>(
ESP.ProjectConfiguration.SELECTED_CONFIG
);
ESP.ProjectConfiguration.store.clear(selectedConfig);
ESP.ProjectConfiguration.store.clear(
ESP.ProjectConfiguration.SELECTED_CONFIG
);
}
const currentIdfSetup = await getCurrentIdfSetup(
workspaceRoot,
false
);
if (statusBarItems["currentIdfVersion"]) {
statusBarItems["currentIdfVersion"].text = currentIdfSetup.isValid
? `$(${
commandDictionary[CommandKeys.SelectCurrentIdfVersion].iconId
}) ESP-IDF v${currentIdfSetup.version}`
: `$(${
commandDictionary[CommandKeys.SelectCurrentIdfVersion].iconId
}) ESP-IDF InvalidSetup`;
}
const coverageOptions = getCoverageOptions(workspaceRoot);
covRenderer = new CoverageRenderer(workspaceRoot, coverageOptions);
}
Expand All @@ -464,35 +463,7 @@ export async function activate(context: vscode.ExtensionContext) {
workspace: workspaceRoot,
} as IOpenOCDConfig;
openOCDManager.configureServer(openOCDConfig);
qemuManager.configure({
workspaceFolder: workspaceRoot,
} as IQemuOptions);
await checkAndNotifyMissingCompileCommands();
}
if (typeof workspaceRoot === undefined) {
workspaceRoot = initSelectedWorkspace(statusBarItems["workspace"]);
await getIdfTargetFromSdkconfig(
workspaceRoot,
statusBarItems["target"]
);
const coverageOptions = getCoverageOptions(workspaceRoot);
covRenderer = new CoverageRenderer(workspaceRoot, coverageOptions);
}
const buildDirPath = idfConf.readParameter(
"idf.buildPath",
workspaceRoot
) as string;
const projectName = await getProjectName(buildDirPath);
const projectElfFile = `${path.join(buildDirPath, projectName)}.elf`;
const debugAdapterConfig = {
currentWorkspace: workspaceRoot,
elfFile: projectElfFile,
} as IDebugAdapterConfig;
debugAdapterManager.configureAdapter(debugAdapterConfig);
const openOCDConfig: IOpenOCDConfig = {
workspace: workspaceRoot,
} as IOpenOCDConfig;
openOCDManager.configureServer(openOCDConfig);
ConfserverProcess.dispose();
})
);
Expand Down

0 comments on commit 0fa8e6c

Please sign in to comment.