Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-241

Centralize the plugin setup process

    XMLWordPrintable

Details

    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.

      $ setup myplugin
      public void setup(@Observes SetupPlugin<MyPlugin> event, ...)
      {
         // do setup here
      }
      
      @Produces public SetupPlugin<MyPlugin> setup(...)
      {
         // do setup here
      }
      

      or perhaps something simpler, but this would need to implement some kind of parameter injection

      @Setup
      public void setup(...)
      {
         // do setup here
      }
      

      Attachments

        Activity

          People

            lincolnthree Lincoln Baxter III (Inactive)
            lincolnthree Lincoln Baxter III (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: