Rubberduck UI子菜单已禁用 [英] Rubberduck UI submenus are disabled

查看:165
本文介绍了Rubberduck UI子菜单已禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Windows 10操作系统上安装了Rubberduck VBE插件v2.0.11.2453(MSIL).

I've just installed the Rubberduck VBE add-in v2.0.11.2453 (MSIL) on Windows 10 OS.

当我在Excel中打开启用宏的Excel工作簿并启动VBA编辑器时,Rubberduck会启动,但是Rubberduck菜单下的所有命令都将被禁用.

When I open a macro-enabled Excel workbook in Excel and launch the VBA editor, Rubberduck starts but all commands under the Rubberduck menu are disabled.

我在做什么错了?

推荐答案

免责声明:我参与了Rubberduck加载项的开发.

Disclaimer: I'm heavily involved with the development of the Rubberduck add-in.

您没做错=)

在早期的alpha 2.x发行版中,我们发现启动时启动初始解析会导致问题(严重崩溃),因为该加载项在VBE完成为项目设置对象模型之前就已经准备好了(s)已加载到IDE中.基本上,VBE在完全完成自身构建之前就加载了其加载项,因此我们不能仅在启动时就启动解析任务.

In earlier alpha 2.x releases we discovered that launching the initial parse on startup was causing problems (violent crashes), because the add-in was, essentially, ready before the VBE had finished setting up the object model for the project(s) loaded in the IDE. Basically the VBE loads its add-ins before it completely finishes constructing itself, so we can't just launch a parse task right on startup.

因此我们禁用了初始/自动分析功能,这就是为什么需要手动进行(现在)的原因.

So we disabled the initial/automatic parse, that's why it needs to be done manually (for now).

Rubberduck命令栏(默认情况下停靠在IDE的顶部,在主命令栏的正下方)包含一个刷新"按钮:

The Rubberduck commandbar (docked at the top of the IDE by default, just below the main commandbar) contains a "refresh" button:

单击该按钮会将解析器状态从待处理"/参与"更改为就绪"/打印"(经过多种状态).

Clicking that button will change the parser state from "Pending" / "En attente" to "Ready" / "Prêt" (after going through a number of states).

状态为已解析"(不会持续很长时间-紧随其后立即切换为解析标识符")后,将立即启用大多数Rubberduck命令,并且重构将在就绪"状态下启用(甚至在检查尚未完成之前.

Most Rubberduck commands will be enabled as soon as the state is "Parsed" (which doesn't last very long - it switches to "Resolving identifiers" quite immediately after), and the refactorings get enabled on "Ready" state (even before inspections finish running).

您还将在 Code Explorer Test Explorer Inspection Results 的工具栏中找到刷新"命令按钮. > Todo Explorer 工具窗口.

You will also find that "refresh" command button in the toolstrip of the Code Explorer, Test Explorer, Inspection Results and Todo Explorer toolwindows.

当Rubberduck在后台运行时,您应该能够浏览/导航代码并使用VBE,但是请注意,Rubberduck解析时修改代码可能会导致某些解析器错误状态;我们假设IDE中的代码是可编译的=)

You should be able to browse/navigate the code and use the VBE while Rubberduck is working in the background, but please note that modifying code while Rubberduck is parsing it is possibly going to result in some parser error states; we assume that the code in the IDE is compilable =)

认为该按钮为好吧,我完成了代码更改,现在与IDE同步":加载项需要知道每个单个令牌的确切编辑器位置才能正常工作应该.在不同步的解析器状态上重构或应用检查快速修复绝对不是一个好主意!

Think of that button as "Okay ducky, I've done code changes, now sync up with the IDE": the add-in needs to know the exact in-editor location of every single token in order to work as it should. Refactoring or applying an inspection quick-fix on de-synchronized parser state is definitely a bad idea!

也就是说,在启动时禁用所有菜单有点懒惰(也很笨拙:例如,用于显示检查结果代码资源管理器的热键即使禁用了菜单,工具窗口也可以使用)-我们将在下一个版本中对其进行修复,并且初始解析也应再次自动进行(我们将使其延迟一段时间后启动,以使VBE有机会完成启动).

That said, disabling all menus on startup was kind of lazy (and clumsy too: for example the hotkey for displaying the inspection results and code explorer toolwindows will work even though the menus are disabled) - we'll fix that by next release, and the initial parse should be automatic again, too (we'll make it start after a delay, to give the VBE a chance to finish starting up).

这篇关于Rubberduck UI子菜单已禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆