Alex,
I would like to make sure that this is consistent with the larger UI refactoring that I'm working on. We need an IEntryComposite interface that is obtained using some sort of provider so that we can do something like
ArrayList<IEntryCompositeProvider> providers = IEntryCompositeProvider.getProviders();
and then search that list for a provider based on type and context by
// Prepare to use the default provider, which will switch based on file, string types, etc.
IEntryCompositeProvider provider = new DefaultEntryCompositeProvider();
// Attempt to find a custom Entry rendering provider if the context is set.
if (entry.getContext().isEmpty()) {
// Do a linear search over the providers to find the one with a name that matches the Entry's context. Ideally we would optimize this with a map since over the life of the program it would get very expensive.
for (IEntryCompositeProvider otherProvider : providers) {
if (otherProvider.getName().equals(entry.getContext()) {
provider = otherProvider;
break;
}
}
}
// Create the IEntryComposite
provider.createComposite(entry,<other arguments like FormToolKits, etc.>);
The IEntryCompositeProviders will be made available in the extension registry and hopefully later via the annotation engine.
Jay