mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix NonEmptyActionGroup.actionUpdateThread
GitOrigin-RevId: b9afaea7b74e1da4f0c724bc36bb3c905ed1de80
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e0da0ba0d0
commit
13220b3f68
@@ -22,7 +22,7 @@ public class NonEmptyActionGroup extends DefaultActionGroup implements DumbAware
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return getClass() == NonEmptyActionGroup.class ? ActionUpdateThread.BGT : super.getActionUpdateThread();
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
package git4idea.index.actions
|
||||
|
||||
import com.intellij.ide.actions.NonEmptyActionGroup
|
||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys
|
||||
import git4idea.index.vfs.GitIndexVirtualFile
|
||||
|
||||
class GitStageIndexFileMenuGroup : NonEmptyActionGroup() {
|
||||
|
||||
override fun getActionUpdateThread() = ActionUpdateThread.BGT
|
||||
|
||||
override fun update(event: AnActionEvent) {
|
||||
event.presentation.isVisible = childrenCount > 0 &&
|
||||
event.getData(CommonDataKeys.VIRTUAL_FILE) is GitIndexVirtualFile
|
||||
super.update(event)
|
||||
event.presentation.isVisible =
|
||||
event.presentation.isVisible &&
|
||||
event.getData(CommonDataKeys.VIRTUAL_FILE) is GitIndexVirtualFile
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user