在 Eclipse 中选择右大括号后显示函数/语句声明?

发布于 2024-08-14 08:43:38 字数 275 浏览 2 评论 0原文

我想知道您是否可以在 Eclipse 中执行类似于此功能(Zend Studio 5.1 提供)的操作。这里有一个它的实际图像:http://tinypic.com/r/2d1pao1/6< /a>

正如您所看到的,它并不只是像 Eclipse 那样在起始大括号周围放置一个框,它实际上会向您显示声明。当您有一个很长的声明并且不想向上滚动并找到其开头时,这尤其方便。

I'm wondering if you can do something similar to this functionality (available with Zend Studio 5.1) in Eclipse. There is an image of it in action here: http://tinypic.com/r/2d1pao1/6

As you can see, it doesn't just put a box around the starting brace like Eclipse does, it actually shows you the declaration. This is especially handy when you have a really long declaration and don't want to scroll up and find its beginning.

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

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

发布评论

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

评论(1

柠檬心 2024-08-21 08:43:38

(2012 年 5 月更新)

最新的“Eclipse 3.8 和 4.2 M7 - 新增功能和值得注意的”介绍Java 编辑器中的括号匹配改进

您可以将鼠标悬停在右花括号上,并在悬停中查看匹配的左大括号附近的源代码。
当您想要查看长代码块开头附近的代码时,这很有帮助。
悬停还显示代码块中的行数。

bracket-hover

悬停对于临时“突出显示”短代码块也很有用。

bracket-hover for short function


原始答案(2009 年 12 月)

实际上,您已经有了 的变体大纲视图

位置(大括号末尾或其他任何位置),大纲视图将...概述您所在的相关函数。

如果您单击函数中的任意 sstatic.net/P8ux5.png" rel="nofollow noreferrer">替代文字
(来源:eclipse. org)


否则,您需要像 Eclipse Source Helper
(更新站点:http://www.hexapixel.com/update

alt 文本

(Update May 2012)

The latest "Eclipse 3.8 and 4.2 M7 - New and Noteworthy" introduced Bracket matching improvements in Java editor:

You can hover over a closing curly brace and see the source near the matching opening brace in a hover.
This is helpful when you want to see the code near the start of a long code block.
The hover also tells the number of lines in the code block.

bracket-hover

The hover is also useful to temporarily 'highlight' a short code block.

bracket-hover for short function


Original answer (December 2009)

Actually, you already have a variant of that with the outline view

If you click anywhere in a function (end of curly brace or anywhere else), the outline view will... outline the relevant function where you are in.

alt text
(source: eclipse.org)


Otherwise, you need a plugin like Eclipse Source Helper
(update site: http://www.hexapixel.com/update)

alt text

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