private static @Nullable TypedActionHandler getOrCreateHandler(@SuppressWarnings("deprecation") @NotNull EditorTypedHandlerBean bean,
                                                                 @NotNull TypedActionHandler originalHandler,
                                                                 @NotNull PluginDescriptor pluginDescriptor) {
    TypedActionHandler handler = bean.handler;
    if (handler != null) {
       return handler;
     }

    try {
      Class<TypedActionHandler> aClass = ApplicationManager.getApplication().loadClass(bean.implementationClass, pluginDescriptor);
      Constructor<TypedActionHandler> constructor;
      try {
        constructor = aClass.getDeclaredConstructor(TypedActionHandler.class);
      }
      catch (NoSuchMethodException ignore) {
        constructor = null;
      }

      if (constructor == null) {
        constructor = aClass.getDeclaredConstructor();
        constructor.setAccessible(true);
        bean.handler = constructor.newInstance();
      }
      else {
        constructor.setAccessible(true);
        bean.handler = constructor.newInstance(originalHandler);
      }
      return bean.handler;
    }
    catch (ProcessCanceledException e) {
      throw e;
    }
    catch (PluginException e) {
      Logger.getInstance(TypedAction.class).error(e);
      return null;
    }
    catch (Exception e) {
      Logger.getInstance(TypedAction.class).error(new PluginException(e, pluginDescriptor.getPluginId()));
      return null;
    }
  }
private static @Nullable TypedActionHandler getOrCreateHandler(@SuppressWarnings("deprecation") @NotNull EditorTypedHandlerBean bean,
                                                                 @NotNull TypedActionHandler originalHandler,
                                                                 @NotNull PluginDescriptor pluginDescriptor)