You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
CMakeToolChainManager is not removing the cmake toolchains. I can still see them even after calling the remove function.
To Reproduce
We have cmake toolchains that are initialized like and added using the CMakeToolChainManager. The issue is that when I am trying to remove them by calling the removeToolChainFile the tcId calculated there is at times different than the one that is used while adding them. Because of this the toolchains are not removed and I am still able to see them in the Preferences.
Expected behavior
Calling the toolchain manager's remove method should remove the toolchains from the eclipse preferences.
Code
My function to remove all CMake ToolChains.
/**
* Removes all the cmake toolchains in the current environment
*/
public void removeCmakeToolChains()
{
ICMakeToolChainManager cmakeTcManager = CCorePlugin.getService(ICMakeToolChainManager.class);
List<ICMakeToolChainFile> cIcMakeToolChainFiles = new ArrayList<>(cmakeTcManager.getToolChainFiles());
for (ICMakeToolChainFile cmakeToolchain : cIcMakeToolChainFiles)
{
try
{
cmakeTcManager.removeToolChainFile(cmakeToolchain);
}
catch (Exception e)
{
Logger.log(e);
}
}
}
The addToolChainFile(ICMakeToolChainFile file) function in CMakeToolChainManager is calculating tcId using makeToolChainId(toolchain);
but the removeToolChainFile(ICMakeToolChainFile file) is using this
I also wanted to become a contributor to eclipse and have a branch and some code ready to push but seems like I need to have some access before doing that I have followed the CONTRIBUTING.MD guide and waiting for the approval to get it
I also wanted to become a contributor to eclipse and have a branch and some code ready to push but seems like I need to have some access before doing that I have followed the CONTRIBUTING.MD guide and waiting for the approval to get it
Contributions are certainly welcome. Please push your change to your fork and create a PR and thanks in advance!
Describe the bug
CMakeToolChainManager is not removing the cmake toolchains. I can still see them even after calling the remove function.
To Reproduce
We have cmake toolchains that are initialized like and added using the CMakeToolChainManager. The issue is that when I am trying to remove them by calling the removeToolChainFile the tcId calculated there is at times different than the one that is used while adding them. Because of this the toolchains are not removed and I am still able to see them in the Preferences.
Expected behavior
Calling the toolchain manager's remove method should remove the toolchains from the eclipse preferences.
Code
My function to remove all CMake ToolChains.
The addToolChainFile(ICMakeToolChainFile file) function in CMakeToolChainManager is calculating tcId using
makeToolChainId(toolchain);
but the removeToolChainFile(ICMakeToolChainFile file) is using this
I am not sure why these two are different while debugging calculating the tcId using the way in add I am able to successfully remove these.
Version Information (please complete the following information):
The text was updated successfully, but these errors were encountered: