void () { ExtensionPointListener dashboardUpdater = new ExtensionPointListener() { @Override public void extensionAdded(@NotNull Object extension, @NotNull PluginDescriptor pluginDescriptor) { updateDashboard(true); } @Override public void extensionRemoved(@NotNull Object extension, @NotNull PluginDescriptor pluginDescriptor) { myProject.getMessageBus().syncPublisher(ServiceEventListener.TOPIC).handle( ServiceEventListener.ServiceEvent.createUnloadSyncResetEvent(RunDashboardServiceViewContributor.class)); } }; CUSTOMIZER_EP_NAME.addExtensionPointListener(dashboardUpdater, myProject); GROUPING_RULE_EP_NAME.addExtensionPointListener(dashboardUpdater, myProject); DEFAULT_TYPES_PROVIDER_EP_NAME.addExtensionPointListener(new ExtensionPointListener<>() { @Override public void extensionAdded(RunDashboardDefaultTypesProvider extension, @NotNull PluginDescriptor pluginDescriptor) { Set<String> types = new HashSet<>(getTypes()); types.addAll(extension.getDefaultTypeIds(myProject)); setTypes(types); } @Override public void extensionRemoved(RunDashboardDefaultTypesProvider extension, @NotNull PluginDescriptor pluginDescriptor) { Set<String> types = new HashSet<>(getTypes()); types.removeAll(extension.getDefaultTypeIds(myProject)); setTypes(types); dashboardUpdater.extensionRemoved(extension, pluginDescriptor); } }, myProject); ConfigurationType.CONFIGURATION_TYPE_EP.addExtensionPointListener(new ExtensionPointListener<>() { @Override public void extensionAdded(ConfigurationType extension, @NotNull PluginDescriptor pluginDescriptor) { setTypes(new HashSet<>(getTypes())); } @Override public void extensionRemoved(ConfigurationType extension, @NotNull PluginDescriptor pluginDescriptor) { Set<String> types = new HashSet<>(getTypes()); types.remove(extension.getId()); setTypes(types); dashboardUpdater.extensionRemoved(extension, pluginDescriptor); } }, myProject); }