apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.63k stars 841 forks source link

LoadOptions introduced to control project loading. #7646

Closed sdedic closed 2 weeks ago

sdedic commented 1 month ago

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:

sdedic commented 1 month 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.

lkishalmi commented 1 month ago

I'm on the road discovering the great Pacific Northwest. Can we hold this a bit longer?

sdedic commented 3 weeks ago

@lkishalmi any updates ?

sdedic commented 2 weeks ago

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.