[
https://issues.jboss.org/browse/SEAMFORGE-92?page=com.atlassian.jira.plug...
]
Lincoln Baxter III updated SEAMFORGE-92:
----------------------------------------
Description:
Many plugins have to implement a setup method which prevents them from correctly using
@RequiresFacet or packaging types - because the setup method cannot be called unless the
@RequiredFacets are installed, which may not be the case before setup() is executed.
Plugins should be able use a @Observes or @Produces method to tie into a centralized setup
system, which executes the plugin setup function sans arguments, and ignoring
requirements.
{code}$ setup myplugin{code}
{code}
public void setup(@Observes SetupPlugin<MyPlugin> event, ...)
{
// do setup here
}
{code}
{code}
@Produces public SetupPlugin<MyPlugin> setup(...)
{
// do setup here
}
{code}
or perhaps something simpler, but this would need to implement some kind of parameter
injection
{code}
@Setup
public void setup(...)
{
// do setup here
}
{code}
was:
Many plugins have to implement a setup method which prevents them from correctly using
@RequiresFacet or packaging types. Plugins should be able use a @Observes or @Produces
method to tie into a centralized setup system, which executes the plugin setup function
sans arguments, and ignoring requirements.
{code}$ setup myplugin{code}
{code}
public void setup(@Observes SetupPlugin<MyPlugin> event, ...)
{
// do setup here
}
{code}
{code}
@Produces public SetupPlugin<MyPlugin> setup(...)
{
// do setup here
}
{code}
or perhaps something simpler, but this would need to implement some kind of parameter
injection
{code}
@Setup
public void setup(...)
{
// do setup here
}
{code}
Centralize the plugin setup process
-----------------------------------
Key: SEAMFORGE-92
URL:
https://issues.jboss.org/browse/SEAMFORGE-92
Project: Seam Forge
Issue Type: Feature Request
Components: Brainstorming, Builtin Plugins, Plugin API
Affects Versions: 1.0.0.Alpha2
Reporter: Lincoln Baxter III
Many plugins have to implement a setup method which prevents them from correctly using
@RequiresFacet or packaging types - because the setup method cannot be called unless the
@RequiredFacets are installed, which may not be the case before setup() is executed.
Plugins should be able use a @Observes or @Produces method to tie into a centralized setup
system, which executes the plugin setup function sans arguments, and ignoring
requirements.
{code}$ setup myplugin{code}
{code}
public void setup(@Observes SetupPlugin<MyPlugin> event, ...)
{
// do setup here
}
{code}
{code}
@Produces public SetupPlugin<MyPlugin> setup(...)
{
// do setup here
}
{code}
or perhaps something simpler, but this would need to implement some kind of parameter
injection
{code}
@Setup
public void setup(...)
{
// do setup here
}
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira