Dreamweaver 可以显示变量、函数、类的列表吗?

发布于 2024-10-17 20:54:10 字数 123 浏览 1 评论 0原文

Dreamweaver 中是否有一个窗口显示当前文档中定义的所有变量和函数?

Is there a window in Dreamweaver that shows all variables and functions defined in the current document?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

一梦等七年七年为一梦 2024-10-24 20:54:10

当您右键单击当前文档时,您将看到函数上下文菜单,其中包含所使用的方法。

When you right click on the current document, you will see Functions context menu which contains the methods used.

丶视觉 2024-10-24 20:54:10

另一个技巧是编辑工具栏 xml 文件并取消注释代码导航按钮。

这为您提供了一个工具栏按钮,您可以单击以列出方法,而不是右键单击并从上下文菜单中选择函数。

仍然不如永久可见的窗格,但比右键>少单击一次。功能上下文菜单。

打开此文件:

C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS5\configuration\Toolbars\toolbars.xml

取消注释此块:

<menubutton id="DW_CodeNav"
    image="Toolbars/images/MM/codenav.png"
    MMString:tooltip="DW_CodeNav/menubutton/tooltip"
    enabled="dw.getFocus() == 'textView' || dw.getFocus() == 'html'"
    menuID="DWCodeNavPopup"
    update="onViewChange"/>

重新启动 Dreamweaver 以使更改生效。

代码导航图标 “{}” 显示在文档工具栏的末尾。工具栏带有(code|split|design)。

Another trick is to edit the toolbars xml file and uncomment the code nav button.

This gives you a toolbar button you can click to list the methods, rather than right clicking and selecting functions from the context menu.

Still not as good as a permanently visible pane, but one less click than the right click > functions context menu.

Open this file:

C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS5\configuration\Toolbars\toolbars.xml

Uncomment this block:

<menubutton id="DW_CodeNav"
    image="Toolbars/images/MM/codenav.png"
    MMString:tooltip="DW_CodeNav/menubutton/tooltip"
    enabled="dw.getFocus() == 'textView' || dw.getFocus() == 'html'"
    menuID="DWCodeNavPopup"
    update="onViewChange"/>

Restart Dreamweaver for the changes to be applied.

Code Nav icon "{}" appears at the end of the Document toolbar. The toolbar with (code|split|design).

逐鹿 2024-10-24 20:54:10

不,Dreamweaver(至少在 CS5 中)没有列出文档中的变量和函数的窗口。 CS5 代码提示引擎非常好,因此它至少应该允许您快速键入代码,但如果您需要文档本身之外的列表,则没有这样的东西。

曾经有一个扩展可以在浮动面板中列出页面中定义的功能,即 Interakt 的 MX Code Pack,但由于 Interakt 被 Adob​​e 收购,并且他们的产品随后“退役”,因此它不再可用:
MX 编码器包

No, Dreamweaver, at least through CS5, does not have a window that lists variables and functions in the document. The CS5 code hinting engine is pretty good, so it should at least allow you to quickly type your code, but if you need a list outside of the document itself, there is no such thing.

There used to be an extension that would list functions defined in the page in a floating panel, Interakt's MX Code Pack, but it is no longer available as Interakt was acquired by Adobe, and their products subsequently "retired":
MX Coder Pack

复古式 2024-10-24 20:54:10

这是一个老话题,但我想我会更新它,因为我向 Adob​​e 提交了一个功能请求,以实现“大纲视图”,这将解决 OP 的原始问题。该功能将在页面内列出功能,类似于 Eclipse 等其他 IDE 工具的做法。 Dreamweaver 目前仅针对 JavaScript 函数执行此操作,但此功能请求也将为其他类型的页面启用此功能(cfmlphpasp)还可以让您查看任何页面的 DOM 轮廓。

请随时在此处向 Adob​​e 提交您的请求:https:// /www.adobe.com/cfusion/mmform/index.cfm?name=wishform&loc=en

请务必引用增强请求#3812052。如果有足够多的人要求此功能,也许 Adob​​e 会倾听。

This is an old topic but I thought I would update it since I submitted a feature request to Adobe to implement an "outline view" which would address OP's original question. The feature would list functions inside of a page similar to how other IDE tools like Eclipse do it. Dreamweaver currently does this for JavaScript functions only but this feature request would enable it for other types of pages as well (cfml, php, asp) and also let you see the DOM outline for any page.

Feel free to submit your request to Adobe here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&loc=en

Be sure to reference enhancement request #3812052. If enough people ask for this feature, perhaps Adobe will listen.

暮光沉寂 2024-10-24 20:54:10

我对变量没有解决方案,但对于函数,我使用了一个小技巧:

我搜索(ctrl+f)字符串“function”,然后按“查找全部”,这将显示结果窗口,其中包含所有行其中的“功能”。双击结果窗口中的一行将转到适当的函数。

您可以使用正则表达式进行一些操作,在其中搜索 function ({some chars}){ ,以绝对确定仅获得函数声明。

然后,您可以保存此查询并根据需要加载它。

I have no sulution for the variables, but for functions I use a little trick:

I do a search (ctrl+f) for the string "function " and the press "find all" this'll show the result window with all lines with "function "in it. Double clicking a line in the result window will take your to the appropriate function.

You can make something with regular expression where you search for function ({some chars}){ to be absolutely certain to only get function declarations.

You can then save this query and load it as needed.

勿忘心安 2024-10-24 20:54:10

事实上,代码提示是我能够在 CS5 中查看函数列表的唯一方法。代码提示的热键是 ctrl+空格键。

Indeed code hinting is the only way I've been able to view a functions list in CS5. The HOTKEY for code hinting is ctrl+spacebar.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文