Codebase refactoring (#226)

* Refactor codebase
This commit is contained in:
Carl-Robert 2023-10-05 02:43:06 +03:00 committed by GitHub
parent 4c8b8d4e4f
commit 7dfe62b96d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 244 additions and 247 deletions

View file

@ -0,0 +1,28 @@
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.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();
}
}
}
}