mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-12 14:10:29 +00:00
28 lines
962 B
Java
28 lines
962 B
Java
package ee.carlrobert.codegpt.indexes;
|
|
|
|
import static com.intellij.openapi.ui.DialogWrapper.OK_EXIT_CODE;
|
|
|
|
import com.intellij.icons.AllIcons;
|
|
import com.intellij.openapi.actionSystem.AnAction;
|
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
|
import ee.carlrobert.codegpt.ui.OverlayUtil;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public class CodebaseIndexingAction extends AnAction {
|
|
|
|
public CodebaseIndexingAction() {
|
|
super("Update Indexes", "Update indexes", AllIcons.Actions.Refresh);
|
|
}
|
|
|
|
@Override
|
|
public void actionPerformed(@NotNull AnActionEvent event) {
|
|
var project = event.getProject();
|
|
if (project != null) {
|
|
var folderStructureTreePanel = new FolderStructureTreePanel(project);
|
|
var show = OverlayUtil.showFileStructureDialog(project, folderStructureTreePanel);
|
|
if (show == OK_EXIT_CODE) {
|
|
new CodebaseIndexingTask(project, folderStructureTreePanel.getReferencedFiles()).run();
|
|
}
|
|
}
|
|
}
|
|
}
|