Closed sdedic closed 2 weeks ago
@lkishalmi last call, the dependent PR #7665 can be done even without this API change (the LoadOptions would just remain private to the module) through impl dependency ... but still I think theLoadOptions
are useful.
If no objections / suggestions are posted, I'll merge tonight.
I'm on the road discovering the great Pacific Northwest. Can we hold this a bit longer?
@lkishalmi any updates ?
No update, merging. If unhappy with the API there's still time to revert in the NB24 timeframe and come up with a better / smaller idea.
The motivation for the change was introduction of an additional flag "offline" for loading, since
LegacyProjectLoader
did not allow for authoritative ban on online operations - it reads settings and decides on its own, mostly doing ON_DEMAND operation - but in some cases it is desired not to go online explicitly even though the option permit that for the default/standard operation.I have decided to export a
LoadOptions
object that is passed into the loading infrastructures and replaces a number of parameters passed down from NbGradleProjectImpl to loaders etc.Two minor additional API additions are in this PR:
NbGradleProject
exposes timestamp of the metadata load. The motivation is to be able to compare the metadata timestamp against GradleFiles timestamps to check if project reload should be done or notNbGradleProject
exposes full current Lookup, that can be used to get the instances of GradleBaseProject, GradleJavaProject - essentially the snapshot of data loaded by the loading infrastructure. Though GradleJavaProject.get(prj) can be used, it always works against 'most recent' load, while the Lookup allows consistency between BaseProject, JavaProject even if another reload happens.