@Override
 protected void postAttach(MetaModelObject parent) {
   if (parent instanceof ControllersMetaModel) {
     controllers = (ControllersMetaModel) parent;
     queue(MetaModelEvent.createAdded(this));
   }
 }
 @Override
 protected void preDetach(MetaModelObject parent) {
   if (parent instanceof ControllersMetaModel) {
     queue(MetaModelEvent.createRemoved(this));
     controllers = null;
   }
 }
  @Override
  public void processEvents(ModuleMetaModel metaModel, EventQueue queue) {
    // Handle root events
    while (queue.hasEvents()) {
      MetaModelEvent event = queue.popEvent();
      MetaModelObject obj = event.getObject();
      if (obj instanceof ApplicationMetaModel) {
        ApplicationMetaModel application = (ApplicationMetaModel) obj;
        if (event.getType() == MetaModelEvent.AFTER_ADD) {
          emitApplication(metaModel.processingContext, application);
        }
      }
    }

    // Distribute per application nevents
    context.processEvents();
  }
  @Override
  public void postProcessAnnotations(ModuleMetaModel metaModel) {

    // Resolve applications
    for (ApplicationMetaModel application : metaModel.getChildren(ApplicationMetaModel.class)) {
      if (application.modified) {
        metaModel.queue(MetaModelEvent.createUpdated(application));
        application.modified = false;
      }
    }

    //
    context.postProcessAnnotations();
  }