ActionUpdateThreadAware
类。
当一个操作或一个操作组定义自己的 update()
方法时,IntelliJ 平台会尝试模仿在 UI 线程中调用 update()
和 getChildren()
方法的旧同步方式,并向其提供 AnActionEvent.dataContext()
中的所有数据。
为此,它会预先在后台线程上缓存所有可能的数据(即使不需要)。
通过重写 getActionUpdateThread()
方法,提供两种模式之一:ActionUpdateThread.EDT
或 ActionUpdateThread.BGT
。
有关详情,请参阅 ActionUpdateThread
文档。