mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +02: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) {
|
public void removeToolChainFile(ICMakeToolChainFile file) {
|
||||||
init();
|
init();
|
||||||
fireEvent(new CMakeToolChainEvent(CMakeToolChainEvent.REMOVED, file));
|
fireEvent(new CMakeToolChainEvent(CMakeToolChainEvent.REMOVED, file));
|
||||||
String tcId = makeToolChainId(file.getProperty(CMakeBuildConfiguration.TOOLCHAIN_TYPE),
|
try {
|
||||||
file.getProperty(CMakeBuildConfiguration.TOOLCHAIN_ID));
|
String tcId = makeToolChainId(file.getToolChain());
|
||||||
filesByToolChain.remove(tcId);
|
filesByToolChain.remove(tcId);
|
||||||
|
String n = ((CMakeToolChainFile) file).n;
|
||||||
String n = ((CMakeToolChainFile) file).n;
|
if (n != null) {
|
||||||
if (n != null) {
|
Preferences prefs = getPreferences();
|
||||||
Preferences prefs = getPreferences();
|
Preferences tcNode = prefs.node(n);
|
||||||
Preferences tcNode = prefs.node(n);
|
|
||||||
try {
|
|
||||||
tcNode.removeNode();
|
tcNode.removeNode();
|
||||||
prefs.flush();
|
prefs.flush();
|
||||||
} catch (BackingStoreException e) {
|
|
||||||
Activator.log(e);
|
|
||||||
}
|
}
|
||||||
|
} catch (CoreException | BackingStoreException e) {
|
||||||
|
Activator.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue