Skip to content

[apitools] BaseApiAnalyzer should have a way to discover the source without a java project #785

@laeubi

Description

@laeubi

I'm currently working on an enhance ApiTools Mojo that works on the build jar file and therefore does not require recompilation of the whole project for API analysis with potentially different settings (see for example #782).

This already works quite well but has the problem that org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer currently requires the source for some features (e.g. giving the location of the API problem).

See for example org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.createCompatibilityProblem(IDelta, IApiComponent, IApiComponent) or org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.checkSinceTags(Delta, IApiComponent)

What I would like to have is a way to tell the BaseApiAnalyzer (e.g. with a method setComponetnSource(...)) where the source is located and then the AST is used (I can also supply the full classpath if that would be required) instead of a full java project.

Another approach would be to construct a complete new java project from the existing one but I currently don't see how this can be archived without triggering all kind of unwanted stuff e.g. compilation, execution of additional builders and so on. Currently
ApiAnalysisApplication do so by performing a lot of non trivial operations including restoring project states and of course it always requires a .project file in the version control system.

@iloveeclipse @vik-chand can you probably help here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions