return list.subList(firstNonNullIndex, afterLastNonNullIndex);
}
private static ExtensionActions getActionsOfExtension(NbGradleExtensionRef extension) {
Lookup extensionLookup = extension.getExtensionLookup();
Collection<? extends GradleProjectContextActions> actionQueries
= extensionLookup.lookupAll(GradleProjectContextActions.class);
ExtensionActions result = new ExtensionActions();
for (GradleProjectContextActions actionQuery: actionQueries) {
result.addAllActions(trimNulls(actionQuery.getContextActions()));
}