MVC Web Project flows

Plugin is associated to .aswp files. These files are XML files that serialize a "Project" data model.

Each node on the graph is serialized on this XML file (see method serialize on NodeContainer class). Each specific part of a node (customObject, customProperties, specificObject and specificProperties) are serialized on an XML element in project XML file, by specific node manager.

Extensions that store XML data to ASWP files are required to use their own XML namespace, with their own XSD schema.

Exporting XML files

Although .aswp files are used to store all visual and modeling data, they need to be exported in various XML file formats, such as struts.xml files.

To perform this export, you may either directly implement a ProjectChangeListener and add it to the project (extension point ). Then you could perform all your transformations by catching events ProjectSaved .

But MVC Web Project plugin also enables to use a chain of XSLT filters. You may define your own XSLT filters by defining them in extension point . At the end of the XSLT chain, you may either specify a target file, or a XsltResultHandler implementation.

Each time MVC Web Project is saved to disk, Xslt filters are applyed and result is stored in target file.

Plugin is currently packaged with 4 xslt chains (only 2 of them are currently used):

  • xslt/struts2step1.xsl assigns all default values to all tags (example: it assigns a struts2 package to each action, even if it was not defined),
  • xslt/struts2-jsplinks2.xsl transforms struts2step1 result file into a properties file that is used to resolve links from JSP pages,
  • xslt/struts2step2.xsl exports Struts2 file from the result of struts2step1,
  • xslt/indent.xsl is a generic template that indents XML,
  • xslt/struts2doctype.xsl, take indent result and adds a doctype for correct struts2 file.

Currently, we use a XsltResultHandler. Its implementation is .