Runnable () { ConfigurationType type = ObjectUtils.tryCast(((RunDashboardGroupImpl<?>)myGroup).getValue(), ConfigurationType.class); if (type != null) { return () -> { RunDashboardManager runDashboardManager = RunDashboardManager.getInstance(myNode.getProject()); Set<String> types = new HashSet<>(runDashboardManager.getTypes()); types.remove(type.getId()); runDashboardManager.setTypes(types); }; } return null; }