void (@NotNull Project project, @Nullable AbstractProjectViewPane currentPane, @NotNull AbstractProjectViewPane newPane) { List<EventPair<?>> events = new ArrayList<>(4); events.add(ProjectViewPaneChangesCollector.TO_PROJECT_VIEW.with(newPane.getClass())); NamedScope selectedScope = newPane instanceof ScopeViewPane ? ((ScopeViewPane)newPane).getSelectedScope() : null; if (selectedScope != null) { events.add(ProjectViewPaneChangesCollector.TO_SCOPE.with(selectedScope.getClass())); } if (currentPane != null) { events.add(ProjectViewPaneChangesCollector.FROM_PROJECT_VIEW.with(currentPane.getClass())); selectedScope = currentPane instanceof ScopeViewPane ? ((ScopeViewPane)currentPane).getSelectedScope() : null; if (selectedScope != null) { events.add(ProjectViewPaneChangesCollector.FROM_SCOPE.with(selectedScope.getClass())); } } ProjectViewPaneChangesCollector.CHANGED.log(project, events); }