Skip to content

Commit

Permalink
fix bug 修复2024.3 不兼容问题,导致扩展菜单处于禁用状态。
Browse files Browse the repository at this point in the history
  • Loading branch information
makejavas committed Nov 18, 2024
1 parent 9218dc7 commit 62f8cad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/sjhy/plugin/actions/MainActionGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public AnAction[] getChildren(@Nullable AnActionEvent event) {
if (psiElement instanceof DbTable) {
selectDbTable = (DbTable) psiElement;
}
if (selectDbTable == null) {
return getEmptyAnAction();
}
//获取选中的所有表
PsiElement[] psiElements = event.getData(LangDataKeys.PSI_ELEMENT_ARRAY);
if (psiElements == null || psiElements.length == 0) {
Expand All @@ -68,6 +65,9 @@ public AnAction[] getChildren(@Nullable AnActionEvent event) {
if (dbTableList.isEmpty()) {
return getEmptyAnAction();
}
if (selectDbTable == null) {
selectDbTable = dbTableList.get(0);
}

//保存数据到缓存
cacheDataUtils.setDbTableList(dbTableList);
Expand Down

0 comments on commit 62f8cad

Please sign in to comment.