Show function/statement declaration after selecting closing brace in Eclipse?

不打扰是莪最后的温柔 提交于 2019-12-11 06:12:46

问题


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.


回答1:


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


(source: eclipse.org)


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



来源:https://stackoverflow.com/questions/1910836/show-function-statement-declaration-after-selecting-closing-brace-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!