void (final @NotNull PopupFactory factory, final int type) { try { final Method method = PopupFactory.class.getDeclaredMethod("setPopupType", int.class); method.setAccessible(true); method.invoke(factory, type); } catch (Throwable e) { LOG.error(e); } }