mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-03-28 14:56:28 +01:00
fix(908): fix for the cmake tool chain removal function. (#909)
Resolves that the calculated ID in the removal function was different than the one in the add Fixes #908
This commit is contained in:
parent
84b5a4c3ea
commit
f680907cab
1 changed files with 9 additions and 11 deletions
|
@ -156,20 +156,18 @@ public class CMakeToolChainManager implements ICMakeToolChainManager {
|
|||
public void removeToolChainFile(ICMakeToolChainFile file) {
|
||||
init();
|
||||
fireEvent(new CMakeToolChainEvent(CMakeToolChainEvent.REMOVED, file));
|
||||
String tcId = makeToolChainId(file.getProperty(CMakeBuildConfiguration.TOOLCHAIN_TYPE),
|
||||
file.getProperty(CMakeBuildConfiguration.TOOLCHAIN_ID));
|
||||
filesByToolChain.remove(tcId);
|
||||
|
||||
String n = ((CMakeToolChainFile) file).n;
|
||||
if (n != null) {
|
||||
Preferences prefs = getPreferences();
|
||||
Preferences tcNode = prefs.node(n);
|
||||
try {
|
||||
try {
|
||||
String tcId = makeToolChainId(file.getToolChain());
|
||||
filesByToolChain.remove(tcId);
|
||||
String n = ((CMakeToolChainFile) file).n;
|
||||
if (n != null) {
|
||||
Preferences prefs = getPreferences();
|
||||
Preferences tcNode = prefs.node(n);
|
||||
tcNode.removeNode();
|
||||
prefs.flush();
|
||||
} catch (BackingStoreException e) {
|
||||
Activator.log(e);
|
||||
}
|
||||
} catch (CoreException | BackingStoreException e) {
|
||||
Activator.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue