不太了解但有用的功能在Eclipse中 [英] Less known but useful features in Eclipse

查看:113
本文介绍了不太了解但有用的功能在Eclipse中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我长久以来一直在使用Eclipse,但不太了解但非常有用的功能是剪贴簿页面,它允许您执行Java代码部分,而不必使用完整的类。例如,如果我需要执行这个简单的for循环,我可以通过创建一个废纸页面(File-> New-> Other-> Scrapbook Page),然后键入以下内容,并按执行所选文本或者Ctrl-U将直接执行代码

  for(int i = 0; i< 10; ++ i)
{
System.out.println(这是剪贴簿页面行:+ i);
}

请发布eclipse可用的其他不太了解但有用的功能。我知道SO中有条目提及eclipse中有用的快捷方式,但是这一个是关于被遗忘或不太了解的功能。

解决方案

p>插件Spy( Alt + Shift + F1 )当然不是很广告。

如果你有任何关于我如何开发一个功能X看起来像eclipse的任何问题,它可以是非常有用的快速找到正确的Eclipse源代码实现该功能!



alt text http://www.willianmitsuda.com/wp- content / uploads / eclipse_tips / spy_opentype.gif



另请参见 eclipse3.5指南


插件间谍让你轻松有关正在运行的UI的信息。

Alt + Shift + F1 可获取有关当前运行的Eclipse插件/数据类型/屏幕的信息。

您可以立即访问当前正在运行的插件。


alt text http://www.vogella.de/articles/EclipseCodeAccess/images/pluginspy10.gif


Eclipse 3.5介绍了检查哪个插件提供菜单的可能性。按 Alt + Shift + F2 ,然后选择一个菜单,查看谁在为这个菜单做出贡献


< blockquote>

alt text http:// www.vogella.de/articles/EclipseCodeAccess/images/pluginspy20.gif


I have been using Eclipse for a long time, the feature that is less known but very useful is the Scrapbook Page, that allows you to execute sections of the Java code without having them to be complete classes. For example, if I need to execute this simple for-loop I can do this by creating a scrap page (File->New->Other->Scrapbook Page) and then typing the following and they pressing the "Execute the Selected Text" or Ctrl-U will execute the code directly

for (int i=0; i < 10; ++i)
{
    System.out.println("Here is the scrapbook page line: " + i);
}

Please post other less known but useful features that are available with eclipse. I know that there are entries in SO that mention the useful shortcuts available in eclipse, however this one is about forgotten or less known features

解决方案

The plugin Spy (Alt+Shift+F1) is certainly one not very advertised.
Yet if you have any question about "how I develop a feature X looking like the one in eclipse", it can be very useful to quickly locate the right eclipse java source which does implement that feature!

alt text http://www.willianmitsuda.com/wp-content/uploads/eclipse_tips/spy_opentype.gif

See also this Guide to eclipse3.5:

The Plugin Spy gives you easily information about the running UI.
Press Alt+Shift+F1 to get information about the current running Eclipse plugin / data types / screen.
This way you can get immediately access to the plugin which is currently running.

alt text http://www.vogella.de/articles/EclipseCodeAccess/images/pluginspy10.gif

Eclipse 3.5 introduced the possibility to check which plugin contributed a menu. Press "Alt+Shift+F2" and select a menu to see who is contributing this menu

alt text http://www.vogella.de/articles/EclipseCodeAccess/images/pluginspy20.gif

这篇关于不太了解但有用的功能在Eclipse中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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