简体   繁体   English

如何配置Eclipse的Package Explorer以显示IntelliJ IDEA的包视图?

[英]How to configure Eclipse's Package Explorer to display like IntelliJ IDEA's package view?

In IntelliJ IDEA, the "Project" pane on the left has "View as:", with the following options: 在IntelliJ IDEA中,左侧的“项目”窗格具有“查看方式:”,具有以下选项:

  • Project 项目
  • Packages
  • Scope 范围
  • Favorites 最爱

If you select "Project" it shows something like Eclipse's "Package Explorer", however if you choose "Packages" and you followed following convention: 如果您选择“Project”,它会显示类似Eclipse的“Package Explorer”,但是如果您选择“Packages”并遵循以下约定:

  • src SRC
    • main 主要
      • java java的
      • org 组织
        • ... ...
      • resources 资源
    • test 测试
      • java java的
      • org 组织
        • ... ...
      • resources 资源

it displays a view that merges the "main" and "test" folders, thus showing you the unit tests next to their associate classes (the classes they test). 它显示一个合并“主”和“测试”文件夹的视图,从而向您显示其关联类(他们测试的类)旁边的单元测试。 This is quite handy IMO, is there a way to do this in Eclipse (3.7.2)? 这是非常方便的IMO,有没有办法在Eclipse中做到这一点(3.7.2)?

Thanks! 谢谢!

This is the way to do it: 这是这样做的方法:

Triangle icon -> Package Presentation -> Hierarchial 三角形图标 - >包装演示 - >层次结构

Note that IntelliJ and AndroidStudio use Gradle style folders, that is src/main... and eclipse doesn't yet support Gradle and uses the older style. 请注意,IntelliJ和AndroidStudio使用Gradle样式文件夹,即src/main...而eclipse尚不支持Gradle并使用旧样式。

Eclipse截图

Screenshots would help for those of us completely unfamiliar with IntelliJ. 截图有助于我们这些完全不熟悉IntelliJ的人。 Have you tried the Java Browsing Perspective and its Projects and Packages Views? 您是否尝试过Java浏览透视图及其项目和包视图?

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

相关问题 Eclipse 中的 Package 资源管理器视图 - Package explorer view in Eclipse 从Eclipse的软件包浏览器中删除工具栏? - Remove toolbar from Eclipse's package explorer? Eclipse的Package Explorer中的描述性图标 - Descriptive icons in Eclipse's Package Explorer Eclipse 中的 IntelliJ 等效项是什么,在包资源管理器视图中显示文件 - What is the IntelliJ equivalent from Eclipse, show file in the package explorer view 我的Eclipse的包浏览器中的白色包图标 - White package icons in my Eclipse's package explorer 如何在 Eclipse 包资源管理器中查看分层包结构 - How to view hierarchical package structure in Eclipse package explorer 在网页上显示项目结构和内容,例如Eclipse的Package Explorer - Showing project structure and contents on a web page, like Eclipse's package explorer 有什么办法在Eclipse的Package Explorer中标记特定文件? 有点像书签但具有视觉提示? - Any way to mark specific files on Eclipse's Package Explorer? A bit like bookmarking but with a visual cue? 在IntelliJ中是否有像Eclipse的Java Browsing透视图这样的包/类浏览器? - In IntelliJ is there any package/class browser like Eclipse's Java Browsing perspective? 我可以在Eclipse的Package Explorer视图的文件夹中修改缩进宽度吗? - Can I modify the width of indenting in Eclipse's Package Explorer view of folders?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM