use of com.jetbrains.cidr.cpp.toolchains.CPPToolchains in project intellij by bazelbuild.
the class ToolchainUtils method setDefaultDebuggerPath.
public static void setDefaultDebuggerPath(String debuggerPath) {
ApplicationManager.getApplication().runWriteAction(() -> {
CPPToolchains cppToolchains = CPPToolchains.getInstance();
Toolchain toolchain = cppToolchains.getDefaultToolchain();
if (toolchain != null) {
cppToolchains.beginUpdate();
toolchain.setDebuggerKind(DebuggerKind.CUSTOM_GDB);
toolchain.setCustomGDBExecutablePath(debuggerPath);
cppToolchains.endUpdate();
return;
}
Toolchain newToolchain = createDefaultToolchain();
newToolchain.setDebuggerKind(DebuggerKind.CUSTOM_GDB);
newToolchain.setCustomGDBExecutablePath(debuggerPath);
cppToolchains.beginUpdate();
cppToolchains.addToolchain(newToolchain);
cppToolchains.endUpdate();
});
}
Aggregations