docs: protected EventDefinition getEventDefintion(IPortletWindow portletWindow, QName name) {
          PortletApplicationDefinition appDD =
                  portletWindow.getPlutoPortletWindow().getPortletDefinition().getApplication();
          for (EventDefinition def : appDD.getEventDefinitions()) {
              if (def.getQName() != null) {
                  if (def.getQName().equals(name)) return def;
              } else {
                  QName tmp = new QName(appDD.getDefaultNamespace(), def.getName());
                  if (tmp.equals(name)) return def;
              }
          }
          throw new IllegalStateException();
      }