简体   繁体   English

在Java EE透视图的“新建”菜单中添加“类”选项

[英]Add “Class” option in the New menu in Java EE perspective

I am almost always using the Java EE perspective in eclipse. 我几乎总是在eclipse中使用Java EE透视图。 However each time I need to add a class I have to do New > Other > Class 但是每次我需要添加一个类时我都要做New> Other> Class

Is there a way to customize the New Menu shown for a perspective so that I have New Class option right in that menu (only 2 clicks away) 有没有办法自定义透视图显示的新菜单,以便我在该菜单中有新的类选项(只需点击2次)

Use the 'Customize Perspective' dialog to do this ('Window > Customize Perspective' or 'Window > Perspective > Customize Perspective' depending on your Eclipse release). 使用'Customize Perspective'对话框执行此操作('Window> Customize Perspective'或'Window> Perspective> Customize Perspective',具体取决于您的Eclipse版本)。

Choose the 'Shortcuts' tab. 选择“快捷方式”标签。 Choose the 'New' submenu (normally the default anyway). 选择“新建”子菜单(通常是默认值)。 Click on the 'Java' category and choose 'Class' (and anything else you want) in the shortcuts section 单击“Java”类别,然后在快捷方式部分中选择“类”(以及您想要的任何其他内容)

在此输入图像描述

You can customize your menu using the "Customize Perspective" option. 您可以使用“自定义透视”选项自定义菜单。

On the menu bar click 在菜单栏上单击

Window -> Customize Perspective

In that menu you have the ability to specify all your defaults for your perspective. 在该菜单中,您可以指定透视图的所有默认值。 For your situation you can go to 根据您的情况,您可以去

Menu Visibility -> File -> New

And then select 'Class' as one of your items to display in the new submenu. 然后选择“类”作为要在新子菜单中显示的项目之一。 You can also deselect ones you never use! 你也可以取消选择你从未使用过的!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM