Skip to content

Commit

Permalink
Make BaseApiAnalyzer#getJavaProject protected
Browse files Browse the repository at this point in the history
Currently there is no way to pass the project to the analyzer without
having an project ProjectComponent, but users of BaseApiAnalyzer might
have other means to find the project in question.

This makes the BaseApiAnalyzer#getJavaProject() protected so
implementors can override this (e.g. Tycho).
  • Loading branch information
laeubi committed Oct 8, 2023
1 parent c9cbfbe commit 540c9ef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public BaseApiAnalyzer() {
public void analyzeComponent(final BuildState state, final IApiFilterStore filterStore, final Properties preferences, final IApiBaseline baseline, final IApiComponent component, final IBuildContext context, IProgressMonitor monitor) {
SubMonitor localMonitor = SubMonitor.convert(monitor, BuilderMessages.BaseApiAnalyzer_analyzing_api, 6);
try {
fJavaProject = getJavaProject(component);
this.fJavaProject = getJavaProject(component);
this.fFilterStore = filterStore;
this.fPreferences = preferences;
if (!ignoreUnusedProblemFilterCheck()) {
Expand Down Expand Up @@ -2665,7 +2665,7 @@ public void checkBaselineMismatch(IApiBaseline baseline, IApiBaseline workspaceB
* @param component API component
* @return Java project or <code>null</code>
*/
private IJavaProject getJavaProject(IApiComponent component) {
protected IJavaProject getJavaProject(IApiComponent component) {
if (component instanceof ProjectComponent pp) {
return pp.getJavaProject();
}
Expand Down

0 comments on commit 540c9ef

Please sign in to comment.