diff --git a/NewAndNoteworthy/CHANGELOG-API.md b/NewAndNoteworthy/CHANGELOG-API.md index d9e61a07b49..6bd73100598 100644 --- a/NewAndNoteworthy/CHANGELOG-API.md +++ b/NewAndNoteworthy/CHANGELOG-API.md @@ -165,6 +165,12 @@ Added methods that can be used to check/fix the Launch Target name: - Added class: - org.eclipse.launchbar.core.target.LaunchTargetUtils +#### org.eclipse.cdt.core.build.CBuildConfiguration.getBuildDirectory() should not be overridden + +The `@nooverride` flag was added to `CBuildConfiguration.getBuildDirectory`. +Extenders should only be overridding `getBuildDirectoryURI` which is part of the `ICBuildConfiguration2` API. +`getBuildDirectory` is a convenience method to convert URI into Path. + #### org.eclipse.cdt.cmake.core.properties refactored A significant simplification to the CMake build properties was completed, this included removing some API that was not used. diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java index 3dae69dab05..e0b48a19b41 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java @@ -325,6 +325,13 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu return getBuildContainer().getLocationURI(); } + /** + * Convenience method to convert getBuildDirectoryURI() to a Path + *

+ * @apiNote This method used to be overridable, but it leads to unclear semantics for extenders. + * Extenders looking to change the build directory should only override {@link #getBuildDirectoryURI()} + * @nooverride This method is not intended to be re-implemented or extended by clients. + */ public Path getBuildDirectory() throws CoreException { return Paths.get(getBuildDirectoryURI()); }