如何在 Eclipse 的 Java EE 透视图中隐藏引用的库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1428481/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I hide Referenced Libraries in Eclipse's Java EE perspective?
提问by Lee
Eclipse's normal Java perspective seems to hide Referenced Libraries just fine (in a "Referenced Libraries" folder in your project). Unfortunately, the Java EE perspective does not seem to have this same feature and enabling it is non-intuitive.
Eclipse 的普通 Java 透视图似乎很好地隐藏了 Referenced Libraries(在项目的“Referenced Libraries”文件夹中)。不幸的是,Java EE 透视图似乎没有这个相同的特性,并且启用它是不直观的。
Can anyone shed some light on this issue?
任何人都可以对这个问题有所了解吗?
回答by Vineet Reynolds
The "Referenced Libraries" view is available in the Java perspective, in the Package Explorer view.
“参考库”视图在 Java 透视图的 Package Explorer 视图中可用。
In the Java EE perspective, the Project Explorer view is the default (as opposed to the Package Explorer view). Therefore, if you wish to view the Referenced Libraries, you must open the Package Explorer view in the Java EE perspective.
在 Java EE 透视图中,Project Explorer 视图是默认的(与 Package Explorer 视图相反)。因此,如果您希望查看引用的库,您必须在 Java EE 透视图中打开包资源管理器视图。
Note that this view will not remove the user libraries that have been added to the project. The use of Referenced Libraries is primarily for user jars, or jars internal to the project, often placed under the lib directory of the project.
请注意,此视图不会删除已添加到项目中的用户库。Referenced Libraries 的使用主要是针对用户jar,或者项目内部的jar,通常放在项目的lib 目录下。
回答by Jesse
I am currently on a Mac using:
我目前在 Mac 上使用:
Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 1
in the Java EE perspective
面向 Web 开发人员的 Eclipse Java EE IDE。
版本:
Java EE 视角中的Indigo Service Release 1
To the right of the project explorer tab, there should be a tiny white arrow facing down that opens up a drop down, choose "Customize View..."
在项目资源管理器选项卡的右侧,应该有一个朝下的白色小箭头,打开一个下拉菜单,选择“自定义视图...”
It opens a window titled "Available Customizations" with the "Filters" tab in focus.
它会打开一个标题为“可用的自定义”的窗口,焦点是“过滤器”选项卡。
Check the box for "Libraries from external" and press okay.
选中“来自外部的库”框,然后按确定。
回答by simon
Click on menu on upper right of package explorer -> Customize View -> Content tab -> uncheck "Java Elements"
点击右上角的菜单 package explorer -> Customize View -> Content tab -> uncheck "Java Elements"
回答by Magne Rasmussen
As far as I can tell, the Package Explorer in the Java EE perspective (Eclipse 3.5) works different from the Java Perspective. If you filter 'Libraries from external', it does not remove the classpath container (EAR Libraries, JRE System Library, etc.), but they will be empty. Also, it does not seem to want to present working sets as the top level element. Guess it needs some TLC. :)
据我所知,Java EE 透视图 (Eclipse 3.5) 中的包资源管理器的工作方式与 Java 透视图不同。如果您过滤“来自外部的库”,它不会删除类路径容器(EAR 库、JRE 系统库等),但它们将为空。此外,它似乎不想将工作集呈现为顶级元素。猜猜它需要一些TLC。:)
回答by Jeremy Z
I think you are confused by too many lars listed in the view of project. Change “Project Explorer" to "Package Explorer" works for me. Steps: "Window"-> "Show view" ->"Other...", input package then select the option and click OK.
我认为您对项目视图中列出的太多 lars 感到困惑。将“项目资源管理器”更改为“包资源管理器”对我有用。步骤:“窗口”->“显示视图”->“其他...”,输入包然后选择选项并单击确定。
Hope helpful.
希望有帮助。