@@ -0,0 +1,1768 @@
+package org.jboss.forge.addons.envers.commands;%0A%0Aimport org.jboss.forge.addon.configuration.Configuration;%0Aimport org.jboss.forge.addon.configuration.facets.ConfigurationFacet;%0Aimport org.jboss.forge.addon.projects.ProjectFactory;%0Aimport org.jboss.forge.addon.projects.Projects;%0Aimport org.jboss.forge.addon.ui.command.CommandExecutionListener;%0Aimport org.jboss.forge.addon.ui.command.UICommand;%0Aimport org.jboss.forge.addon.ui.context.UIExecutionContext;%0Aimport org.jboss.forge.addon.ui.context.UISelection;%0Aimport org.jboss.forge.addon.ui.result.Result;%0A%0Aimport javax.inject.Inject;%0A%0A/**%0A * @author Ivan St. Ivanov%0A */%0Apublic class JpaEntityCreationListener implements CommandExecutionListener%0A%7B%0A   @Override public void preCommandExecuted(UICommand uiCommand, UIExecutionContext uiExecutionContext)%0A   %7B%0A%0A   %7D%0A%0A   @Inject%0A   private ProjectFactory projectFactory;%0A%0A   @Override public void postCommandExecuted(UICommand uiCommand, UIExecutionContext uiExecutionContext, Result result)%0A   %7B%0A      String commandName = uiCommand%0A               .getMetadata(uiExecutionContext.getUIContext())%0A               .getName();%0A      if (commandName.equals(%22JPA: New Entity%22) && projectFactory != null)%0A      %7B%0A%0A         Configuration configuration = Projects%0A                  .getSelectedProject(projectFactory, uiExecutionContext.getUIContext())%0A                  .getFacet(ConfigurationFacet.class)%0A                  .getConfiguration();%0A         if ((Boolean) configuration.getProperty(Constants.AUTO_AUDIT_CONFIG_ENTRY))%0A         %7B%0A            uiExecutionContext.getUIContext().getSelection();%0A         %7D%0A%0A      %7D%0A   %7D%0A%0A   @Override public void postCommandFailure(UICommand uiCommand, UIExecutionContext uiExecutionContext,%0A            Throwable throwable)%0A   %7B%0A%0A   %7D%0A%7D%0A

Add the command listener showcase