void (Project project, Object commandGroupId) { Object lastGroupId = SoftReference.dereference(myLastGroupId); if (!CommandMerger.canMergeGroup(commandGroupId, lastGroupId)) myRegisteredBackPlaceInLastGroup = false; if (commandGroupId != lastGroupId) { myLastGroupId = commandGroupId == null ? null : new WeakReference<>(commandGroupId); } if (myCommandStartPlace != null && myCurrentCommandIsNavigation && myCurrentCommandHasMoves) { if (!myBackInProgress) { if (!myRegisteredBackPlaceInLastGroup) { myRegisteredBackPlaceInLastGroup = true; putLastOrMerge(myCommandStartPlace, BACK_QUEUE_LIMIT, false); registerViewed(myCommandStartPlace.myFile); } if (!myForwardInProgress) { myForwardPlaces.clear(); } } removeInvalidFilesFromStacks(); } if (myCurrentCommandHasChanges) { setCurrentChangePlace(project == myProject); } else if (myCurrentCommandHasMoves) { myCurrentIndex = myChangePlaces.size(); } }