mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[vfs][cleanup] remove VFS recovery notification
+ Notification about VFS recovery was introduced in 241, to make user aware that delayed IDE startup is due to VFS recovery, which was caused (likely) by user actions (e.g. kill-ing the IDE). That notification causes a lot of misunderstanding/misinterpretation, so it was quickly disabled by default in Release versions, left only in EAP -- and a bit later disabled in EAP also. Now it is time to get rid of it entirely GitOrigin-RevId: 34d923db37fdfd16fbb13cf5bbf915d2bca5664f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c8050aa812
commit
dda52aac34
@@ -1,9 +1,5 @@
|
||||
notification.group.ide.errors=IDE errors
|
||||
|
||||
notification.group.vfs=Virtual file system
|
||||
notification.vfs.vfs-recovered.notification.title={0} took longer to launch
|
||||
notification.vfs.vfs-recovered.notification.text=File system caches contained errors, and {0} required some time to repair them. \
|
||||
Such errors are usually caused by an improper shutdown or crash.
|
||||
|
||||
notification.group.browser.config.problems=Browser configuration problems
|
||||
notification.title.browser.config.problem=Browser configuration problem
|
||||
|
||||
@@ -5,17 +5,10 @@ import com.intellij.concurrency.ConcurrentCollectionFactory;
|
||||
import com.intellij.concurrency.JobSchedulerImpl;
|
||||
import com.intellij.diagnostic.Activity;
|
||||
import com.intellij.diagnostic.StartUpMeasurer;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.ide.plugins.DynamicPluginListener;
|
||||
import com.intellij.ide.plugins.IdeaPluginDescriptor;
|
||||
import com.intellij.notification.Notification;
|
||||
import com.intellij.notification.NotificationGroup;
|
||||
import com.intellij.notification.NotificationGroupManager;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo;
|
||||
import com.intellij.openapi.diagnostic.ControlFlowException;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.diagnostic.ThrottledLogger;
|
||||
@@ -39,7 +32,6 @@ import com.intellij.openapi.vfs.newvfs.events.*;
|
||||
import com.intellij.openapi.vfs.newvfs.impl.*;
|
||||
import com.intellij.openapi.vfs.newvfs.persistent.IPersistentFSRecordsStorage.RecordForRead;
|
||||
import com.intellij.openapi.vfs.newvfs.persistent.IPersistentFSRecordsStorage.RecordReader;
|
||||
import com.intellij.openapi.vfs.newvfs.persistent.recovery.VFSInitializationResult;
|
||||
import com.intellij.openapi.vfs.newvfs.persistent.recovery.VFSRecoveryInfo;
|
||||
import com.intellij.openapi.vfs.pointers.VirtualFilePointerManager;
|
||||
import com.intellij.platform.diagnostic.telemetry.PlatformScopesKt;
|
||||
@@ -72,9 +64,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static com.intellij.configurationStore.StorageUtilKt.RELOADING_STORAGE_WRITE_REQUESTOR;
|
||||
import static com.intellij.notification.NotificationType.INFORMATION;
|
||||
import static com.intellij.util.SystemProperties.getBooleanProperty;
|
||||
import static com.intellij.util.SystemProperties.getLongProperty;
|
||||
import static java.util.concurrent.TimeUnit.NANOSECONDS;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
@@ -87,18 +77,6 @@ public final class PersistentFSImpl extends PersistentFS implements Disposable {
|
||||
|
||||
private static final boolean LOG_NON_CACHED_ROOTS_LIST = getBooleanProperty("PersistentFSImpl.LOG_NON_CACHED_ROOTS_LIST", false);
|
||||
|
||||
/**
|
||||
* Show notification about successful VFS recovery if VFS init takes longer than [nanoseconds]
|
||||
* <br/>
|
||||
* By default notification is <b>off completely</b>: there is too much controversy about it's
|
||||
* usefulness and wording, and from the other side -- so far recovery seems to work smoothly
|
||||
* enough, so user doesn't really need to even know about it.
|
||||
* TODO RC: consider removing it completely in the v243, if not re-requested
|
||||
*/
|
||||
private static final long NOTIFY_OF_RECOVERY_IF_LONGER_NS = SECONDS.toNanos(
|
||||
getLongProperty("vfs.notify-user-if-recovery-longer-sec", Long.MAX_VALUE)
|
||||
);
|
||||
|
||||
/**
|
||||
* Sometimes PFS got request for the files with lost (missed) roots. We try to resolve each root against persistence,
|
||||
* and it is quite expensive, so we don't want to repeat that attempt for the same root, if it is found to be missed.
|
||||
@@ -221,14 +199,6 @@ public final class PersistentFSImpl extends PersistentFS implements Disposable {
|
||||
VFSRecoveryInfo recoveryInfo = _vfsPeer.connection().recoveryInfo();
|
||||
List<VFSInitException> recoveredErrors = recoveryInfo.recoveredErrors;
|
||||
if (!recoveredErrors.isEmpty()) {
|
||||
|
||||
//if there was recovery, and it took long enough for user to notice:
|
||||
VFSInitializationResult initializationResult = _vfsPeer.initializationResult();
|
||||
if (app != null && !app.isHeadlessEnvironment()
|
||||
&& initializationResult.totalInitializationDurationNs > NOTIFY_OF_RECOVERY_IF_LONGER_NS) {
|
||||
showNotificationAboutLongRecovery();
|
||||
}
|
||||
|
||||
//refresh the folders there something was 'recovered':
|
||||
refreshSuspiciousDirectories(recoveryInfo.directoriesIdsToRefresh());
|
||||
}
|
||||
@@ -258,25 +228,6 @@ public final class PersistentFSImpl extends PersistentFS implements Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
private static void showNotificationAboutLongRecovery() {
|
||||
NotificationGroup notificationGroup = NotificationGroupManager.getInstance().getNotificationGroup("VFS");
|
||||
if (notificationGroup != null) {
|
||||
ApplicationNamesInfo names = ApplicationNamesInfo.getInstance();
|
||||
Notification notification = notificationGroup.createNotification(
|
||||
IdeBundle.message("notification.vfs.vfs-recovered.notification.title", names.getFullProductName()),
|
||||
IdeBundle.message("notification.vfs.vfs-recovered.notification.text", names.getFullProductName()),
|
||||
INFORMATION
|
||||
)
|
||||
.setDisplayId("VFS.recovery.happened")
|
||||
.setImportant(false);
|
||||
AnAction reportProblemAction = ActionManager.getInstance().getAction("ReportProblem");
|
||||
if (reportProblemAction != null) {
|
||||
notification = notification.addAction(reportProblemAction);
|
||||
}
|
||||
notification.notify(/*project: */ null);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public boolean isConnected() {
|
||||
return myConnected.get();
|
||||
|
||||
@@ -1668,8 +1668,6 @@
|
||||
<notificationGroup id="Power Save Mode" displayType="BALLOON" bundle="messages.IdeBundle" key="notification.group.power.save.mode"/>
|
||||
<notificationGroup id="Essential Highlighting Mode" displayType="BALLOON" bundle="messages.IdeBundle" key="notification.group.essential-highlighting.mode"/>
|
||||
<notificationGroup id="IDE Caches" displayType="BALLOON" bundle="messages.IndexingBundle" key="notification.group.ide.caches"/>
|
||||
<notificationGroup id="VFS" displayType="BALLOON" bundle="messages.IdeBundle"
|
||||
key="notification.group.vfs"/>
|
||||
<notificationGroup id="Cache Recovery" displayType="STICKY_BALLOON" bundle="messages.IdeBundle"
|
||||
key="notification.group.cache.recovery"/>
|
||||
<notificationGroup id="Framework Detection" displayType="BALLOON" bundle="messages.ProjectBundle"
|
||||
|
||||
Reference in New Issue
Block a user