简体   繁体   English

如何在 Eclipse 中自定义“新”选项

[英]How to customize 'new' option in Eclipse

When I'm using Eclipse to code in Java, I want to use the 'New' button (located below File, Edit...) to create a new class.当我使用 Eclipse 在 Java 中编码时,我想使用“新建”按钮(位于文件、编辑...下方)来创建一个新的 ZA2F2ED4F8EBC2CBB4C21A29DC40AB61D。 I know it's possible because I've been able to use it like that on a different computer.我知道这是可能的,因为我已经能够在另一台计算机上使用它。 However, the only options displayed are "Project", "Example", "Other...".但是,显示的唯一选项是“项目”、“示例”、“其他...”。 So I have to select other and go find "Class".所以我必须 select 其他和 go 找到“类”。

I want a way to modify this list to include Java Project, Class, and whatever else I need.我想要一种方法来修改此列表以包括 Java 项目、Class 以及我需要的任何其他内容。 It's the same story when I right-click the src folder in the package explorer.当我右键单击 package 资源管理器中的 src 文件夹时,情况也是如此。 I want to make a class in that folder, but I have to click other, navigate the new window to class, etc.我想在该文件夹中创建一个 class,但我必须单击其他,将新的 window 导航到 class 等。

Can this be simplified?这可以简化吗?

Make sure you're in the right perspective.确保你的观点正确。 I see what you're looking for if I'm in the "Java" perspective, but not in other perspectives, such as "Java EE" or "Debug".如果我在“Java”透视图中,我会看到您在寻找什么,但在“Java EE”或“Debug”等其他透视图中看不到。

A "perspective" in Eclipse is the set of panes, toolbars, menus, etc. for a particular purpose. Eclipse 中的“透视图”是用于特定目的的一组窗格、工具栏、菜单等。 There should be toolbar buttons all the way on the right for them.他们的右边应该有工具栏按钮。

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

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