DefaultActionGroup () { DefaultActionGroup epActions = new DefaultActionGroup(); InspectionWidgetActionProvider.EP_NAME.getExtensionList(). forEach(extension -> { AnAction action = extension.createAction(myEditor); if (action != null) { extensionActions.put(extension, action); epActions.add(action); } }); InspectionWidgetActionProvider.EP_NAME.addExtensionPointListener(new ExtensionPointListener<>() { @Override public void extensionAdded(@NotNull InspectionWidgetActionProvider extension, @NotNull PluginDescriptor pluginDescriptor) { AnAction action = extension.createAction(myEditor); if (action != null) { extensionActions.put(extension, action); epActions.add(action); } } @Override public void extensionRemoved(@NotNull InspectionWidgetActionProvider extension, @NotNull PluginDescriptor pluginDescriptor) { AnAction action = extensionActions.remove(extension); if (action != null) { epActions.remove(action); } } }, resourcesDisposable); return epActions; }