Reopen plugin's source code (1.10.8 → 2.0.5)

This commit is contained in:
Carl-Robert Linnupuu 2023-08-25 16:36:22 +03:00
parent faf02a5c0a
commit 26a3e07360
231 changed files with 88014 additions and 4271 deletions

View file

@ -0,0 +1,30 @@
package ee.carlrobert.codegpt.actions;
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.embeddings.CodebaseIndexingTask;
import ee.carlrobert.codegpt.embeddings.FolderStructureTreePanel;
import ee.carlrobert.codegpt.util.OverlayUtils;
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 = OverlayUtils.showFileStructureDialog(project, folderStructureTreePanel);
if (show == OK_EXIT_CODE) {
new CodebaseIndexingTask(project, folderStructureTreePanel.getCheckedFiles()).run();
}
}
}
}