@SuppressWarnings("deprecation")
public static List<NbGradleExtensionRef> loadExtensions(NbGradleProject project) throws IOException {
Lookup defaultLookup = Lookup.getDefault();
Collection<? extends org.netbeans.gradle.project.api.entry.GradleProjectExtensionQuery> defs1
= defaultLookup.lookupAll(org.netbeans.gradle.project.api.entry.GradleProjectExtensionQuery.class);
Collection<? extends GradleProjectExtensionDef<?>> defs2
= defaultLookup.lookupAll(defClass());
int expectedExtensionCount = defs1.size() + defs2.size();