Package Extensions

Since version 0.2.0, MVC Web Project enables to add new tabs on tree package editor. This is mainly used to extend properties of generic tree packages (for example, it is used to assign a specific struts2 package to a given tree package).

Package extensions must implement interface com.alveole.interfaces.PackageExtensionManager .

Then, declare them in extension point .

        <!ELEMENT extension (panel)+>
        <!ATTLIST extension
                point CDATA #REQUIRED
                id    CDATA #REQUIRED
                name  CDATA #IMPLIED>
  • point - must contain
  • id - an optional unique identifier of this PackageExtension.
  • name - a required name of this tab (will be displayed with other tabs on package editor).

Extension point contains one or more panel tag:

        <!ELEMENT panel (requires*)>
        <!ATTLIST panel
                class CDATA #REQUIRED>
  • class - the fully qualified name of the class that implements PackageExtensionManager interface.

panel may contain a list of requires tags that specifies required features.

        <!ELEMENT requires (#EMPTY)>
        <!ATTLIST requires
                feature CDATA #REQUIRED>
  • feature - the name of a feature that is required to be enabled on project, for this plugin to be enabled.

If any of the required features is disabled on project, manager will be skipped.

There is currently one implementation of PackageExtensionManager:

  • Struts2PackageExtensionManager: this extension enables to assign struts2 specific properties to a tree package (such as the struts2 package that is associated by default to all actions under this tree package).