在Eclipse中选择关闭括号后显示函数/语句声明? [英] Show function/statement declaration after selecting closing brace in Eclipse?

查看:282
本文介绍了在Eclipse中选择关闭括号后显示函数/语句声明?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在Eclipse中执行与此功能类似的功能(Zend Studio 5.1提供)。这里有一个图像:






否则,您需要一个插件,如 Eclipse Source助手

(更新网站: http:// www。 hexapixel.com/update



alt text http://hexapixel.com/img/software/sourcehelper/ss/ss_whole.gif


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.

解决方案

(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.

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


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 http://help.eclipse.org/galileo/topic/org.eclipse.cdt.doc.user/images/outlineView.png


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

alt text http://hexapixel.com/img/software/sourcehelper/ss/ss_whole.gif

这篇关于在Eclipse中选择关闭括号后显示函数/语句声明?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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