Disposable (@NotNull FileTypeBean bean, @NotNull PluginDescriptor pluginDescriptor) { bean.setPluginDescriptor(pluginDescriptor); Disposable disposable = Disposer.newDisposable(); WriteAction.run(() -> FileTypeManagerImpl.EP_NAME.getPoint().registerExtension(bean, disposable)); return disposable; }