File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
cmake/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -156,20 +156,18 @@ public void addToolChainFile(ICMakeToolChainFile file) {
156
156
public void removeToolChainFile (ICMakeToolChainFile file ) {
157
157
init ();
158
158
fireEvent (new CMakeToolChainEvent (CMakeToolChainEvent .REMOVED , file ));
159
- String tcId = makeToolChainId (file .getProperty (CMakeBuildConfiguration .TOOLCHAIN_TYPE ),
160
- file .getProperty (CMakeBuildConfiguration .TOOLCHAIN_ID ));
161
- filesByToolChain .remove (tcId );
162
-
163
- String n = ((CMakeToolChainFile ) file ).n ;
164
- if (n != null ) {
165
- Preferences prefs = getPreferences ();
166
- Preferences tcNode = prefs .node (n );
167
- try {
159
+ try {
160
+ String tcId = makeToolChainId (file .getToolChain ());
161
+ filesByToolChain .remove (tcId );
162
+ String n = ((CMakeToolChainFile ) file ).n ;
163
+ if (n != null ) {
164
+ Preferences prefs = getPreferences ();
165
+ Preferences tcNode = prefs .node (n );
168
166
tcNode .removeNode ();
169
167
prefs .flush ();
170
- } catch (BackingStoreException e ) {
171
- Activator .log (e );
172
168
}
169
+ } catch (CoreException | BackingStoreException e ) {
170
+ Activator .log (e );
173
171
}
174
172
}
175
173
You can’t perform that action at this time.
0 commit comments