The way the FoldViewFactory is registered is quite odd, and seems to rely on a static initialization block call chain: FoldHierarchy.class loaded -> static initialization block -> ensureApiAccessorRegistered() -> ApiPackageAccessor.register -> FoldViewFactory.register().
I've added a comment on nbdev@  and Jesse mentioned in reply  that this looks like a perfect candidate for Lookup usage.
My suggestion would have been to at least replace the static initialization block with a ModuleInstall, but Lookup is actually nicer.
EditorViewFactory.factories() should use Lookup.getDefault().lookupAll(EditorViewFactory.Factory.class), and FoldViewFactory.FoldFactory and its ilk (HighlightsViewFactory.HighlightsFactory, TestHighlightsViewFactory.FactoryImpl) should be registered using @ServiceProvider. (Which would also obviate the need for the int importance() attribute, since @SP.position could be used.)
It was just a preliminary way until View Hierarchy SPI will be created (issue #205707).
In editor related modules we tend to register by using @MimeRegistration annotation so I would prefer that.
OK, will wait :)
Closing after 2 years. View hierarchy is still not a proper API. I am sure the relevant code will be converted when the SPI becomes public.