netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Tame Gradle Project Loading

Open lkishalmi opened this issue 3 years ago • 2 comments

@sdedic this is an attempt to tame the Gradle project loading methods and calls. My motivation was, that I started to get lost in the calls when a Gradle project, loaded re-loaded.

What I'm trying here is to move the options of the different kind of re-loads into a separate class as GradleLoadOptions so the code can be more descriptive, and the usage of certain load flags could be more easily tracked. I could be completely wrong with this PR and my approach could be wrong as well. Your feedback is essential.

I've tried not to break things, though made a few not compatible changes. loadedProjectSerial and currentSerial in NBGradleProjectImpl were moved to a new sequence field to GradleProject, so dumpProject() cannot set the loadedProjectSerial to zero.

Tests seems to be fine, save NbGradleProjectImpl.testEventsProcessedBeforeCompletion() which hangs in infinite wait. Unfortunately I could not crack what that test really does, so I need some help there.

There are some unused code mentioning GradleLoadContext that shall be ignored.

I have purposefully not changed the javadoc on the load methods yet, so the former parameters can be looked up while replacing the calls with GradleLoadOptions arguments.

lkishalmi avatar Mar 16 '22 00:03 lkishalmi

ok to review now, or is it still being overhauled (it's marked as wip) ?

sdedic avatar Mar 17 '22 08:03 sdedic

Marked as wip, as this is still in a draft, "let's talk about it" phase.

lkishalmi avatar Mar 17 '22 14:03 lkishalmi