Skip to content

Commit cfbb5b6

Browse files
committed
Clarify API around CBuildConfiguration.getBuildDirectory as @nooverride
1 parent c8e47b3 commit cfbb5b6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

NewAndNoteworthy/CHANGELOG-API.md

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ The following classes have been removed or modified in API breaking ways:
2424
- spelling corrected for methods with Uninitialized in the name
2525
- setWarnUnused renamed to setWarnUnusedVars and isWarnUnused renamed to isWarnUnusedVars
2626

27+
## org.eclipse.cdt.core.build.CBuildConfiguration.getBuildDirectory() should not be overridden
28+
29+
The `@nooverride` flag was added to `CBuildConfiguration.getBuildDirectory`.
30+
Extenders should only be overridding `getBuildDirectoryURI` which is part of the `ICBuildConfiguration2` API.
31+
`getBuildDirectory` is a convenience method to convert URI into Path.
2732

2833
## API Changes in CDT 11.5.
2934

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

+7
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ public URI getBuildDirectoryURI() throws CoreException {
282282
return getBuildContainer().getLocationURI();
283283
}
284284

285+
/**
286+
* Convenience method to convert getBuildDirectoryURI() to a Path
287+
* <p>
288+
* @apiNote This method used to be overridable, but it leads to unclear semantics for extenders.
289+
* Extenders looking to change the build directory should only override {@link #getBuildDirectoryURI()}
290+
* @nooverride This method is not intended to be re-implemented or extended by clients.
291+
*/
285292
public Path getBuildDirectory() throws CoreException {
286293
return Paths.get(getBuildDirectoryURI());
287294
}

0 commit comments

Comments
 (0)