summaryrefslogtreecommitdiff
path: root/platform/lang-impl/src/com/intellij/util/indexing/ForceIndexRescanningAction.java
blob: e464c4142cf57eee03185d114c862c4a70fb4593 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.util.indexing;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.project.Project;
import com.intellij.util.indexing.diagnostic.ScanningType;
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,
                                                           false,
                                                           null,
                                                           "Force re-scanning",
                                                           ScanningType.FULL_FORCED);
    task.queue(project);
  }
}