add force index rescanning action

GitOrigin-RevId: 6d24e2bc175375d9738d4bdb6ac10eb2e81f9e30
This commit is contained in:
Dmitry Batkovich
2021-07-30 14:29:54 +00:00
committed by intellij-monorepo-bot
parent 3268d3160a
commit 33ce598718
3 changed files with 25 additions and 0 deletions
@@ -0,0 +1,21 @@
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util.indexing;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.project.DumbService;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
final class ForceIndexRescanningAction extends DumbAwareAction {
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
Project project = e.getProject();
if (project == null) return;
UnindexedFilesUpdater task = new UnindexedFilesUpdater(project,
false,
null,
"Force re-scanning");
DumbService.getInstance(project).queueTask(task);
}
}
@@ -2481,3 +2481,5 @@ action.RunToolbarMainMultipleStopAction.text=Stop
action.RunToolbarResumeAction.text=Resume
action.RunToolbarPauseAction.text=Pause
action.RunToolbarHotSwapAction.text=HotSwap
action.ForceIndexRescanning.text=Synchronize Indexes
@@ -1590,5 +1590,7 @@
<action id="ClickLink" class="com.intellij.codeInsight.navigation.actions.ClickLinkAction"
use-shortcut-of="GotoDeclaration" />
<action id="ForceIndexRescanning" internal="true" class="com.intellij.util.indexing.ForceIndexRescanningAction" icon="AllIcons.Actions.Refresh"/>
</actions>
</idea-plugin>