Skip to content

Commit 654e270

Browse files
committed
Clarify API around CBuildConfiguration.getBuildDirectory as @nooverride
1 parent 0e53389 commit 654e270

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

NewAndNoteworthy/CHANGELOG-API.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ Added methods that can be used to check/fix the Launch Target name:
165165
- Added class:
166166
- org.eclipse.launchbar.core.target.LaunchTargetUtils
167167

168+
#### org.eclipse.cdt.core.build.CBuildConfiguration.getBuildDirectory() should not be overridden
169+
170+
The `@nooverride` flag was added to `CBuildConfiguration.getBuildDirectory`.
171+
Extenders should only be overridding `getBuildDirectoryURI` which is part of the `ICBuildConfiguration2` API.
172+
`getBuildDirectory` is a convenience method to convert URI into Path.
173+
168174
#### org.eclipse.cdt.cmake.core.properties refactored
169175

170176
A significant simplification to the CMake build properties was completed, this included removing some API that was not used.

core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,13 @@ public URI getBuildDirectoryURI() throws CoreException {
325325
return getBuildContainer().getLocationURI();
326326
}
327327

328+
/**
329+
* Convenience method to convert getBuildDirectoryURI() to a Path
330+
* <p>
331+
* @apiNote This method used to be overridable, but it leads to unclear semantics for extenders.
332+
* Extenders looking to change the build directory should only override {@link #getBuildDirectoryURI()}
333+
* @nooverride This method is not intended to be re-implemented or extended by clients.
334+
*/
328335
public Path getBuildDirectory() throws CoreException {
329336
return Paths.get(getBuildDirectoryURI());
330337
}

0 commit comments

Comments
 (0)