Hi,
I don't think we need different Macro Sources in the rendering module.
All we need is a single source that takes its macros from the
classloader.
What we do need are different modules that create Macro components so
that they are made available to the single Macro Source.
For example the annotations are defining macros and their not a
source. They don't need to be. All they have to do is call
ComponentManager.registerComponent() to register new macros.
The same should be done for macros defined as wiki pages or macros
defined in a remote repository. All we need are handlers that can
extract information and generate calls to
ComponentManager.registerComponent().
Now since we need to be performant we want to cache Macros at init
time in the Macro manager but we also need to support macros added
dynamically later on. For this I think we need to introduce Component
Manager events (this already exists in Plexus BTW) that would allow
listeners to get events when a component is created or disposed of. In
this manner the Macro Manager would subscribe to CM events for the
Macro.class role and be able to add/remove Macros on the fly.
WDYT?
Thanks
-Vincent