mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-12 22:31:24 +00:00
feat: add include file in context to editor context menu (#475)
* feat: add include file in context to editor context menu * fix: custom title for IncludeFilesInContextAction in editor context menu
This commit is contained in:
parent
29b36c52f8
commit
9666590cb1
3 changed files with 8 additions and 5 deletions
|
|
@ -52,6 +52,10 @@ public class IncludeFilesInContextAction extends AnAction {
|
|||
super(CodeGPTBundle.get("action.includeFilesInContext.title"));
|
||||
}
|
||||
|
||||
public IncludeFilesInContextAction(String customTitleKey) {
|
||||
super(CodeGPTBundle.get(customTitleKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
var project = e.getProject();
|
||||
|
|
@ -93,11 +97,6 @@ public class IncludeFilesInContextAction extends AnAction {
|
|||
}
|
||||
|
||||
private @Nullable FileCheckboxTree getCheckboxTree(DataContext dataContext) {
|
||||
var psiElement = CommonDataKeys.PSI_ELEMENT.getData(dataContext);
|
||||
if (psiElement != null) {
|
||||
return new PsiElementCheckboxTree(psiElement);
|
||||
}
|
||||
|
||||
var selectedVirtualFiles = VIRTUAL_FILE_ARRAY.getData(dataContext);
|
||||
if (selectedVirtualFiles != null) {
|
||||
return new VirtualFileCheckboxTree(selectedVirtualFiles);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue