mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add force index rescanning action
GitOrigin-RevId: 6d24e2bc175375d9738d4bdb6ac10eb2e81f9e30
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3268d3160a
commit
33ce598718
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user