如何在 Intellij IDEA 中展开折叠包链? [英] How to expand folded package chain in Intellij IDEA?

查看:106
本文介绍了如何在 Intellij IDEA 中展开折叠包链?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果中间包为空,Intellij IDEA 会自动将包链接在一起.总的来说,这是一个不错的功能.但是,有时您不希望它们被链接起来,尤其是当您正在为新项目创建新的包结构时.我可能遇到过为某个包禁用此功能的设置,但我现在找不到它.那么,有谁知道如何控制这个功能?非常感谢.

Intellij IDEA automatically chain packages together if the intermediate ones are otherwise empty. It is a nice feature in general. However, sometimes you don't want them to be chained, especially when you are in the middle of creating new package structures for your new project. I might have come across the setting for disabling this feature for a certain package, but I can't find it where now. So, does anyone know how to control this feature? Thank you very much.

顺便说一句,如果您需要澄清,我所说的包链接的意思如下.假设你有这个包结构:

BTW, in case you need clarification, what I mean by package chaining is as follows. Suppose you have this package structure:

$ tree com
com
└── company
    └── project
        └── some
            └── feature

由于中间文件夹里面真的没有别的东西,Intellij IDEA会自动显示为

Since there are really nothing else inside the intermediate folders, Intellij IDEA will automatically display it like

com.company.project.some.feature

在项目资源管理器中,看起来包是链接在一起的.

in the project explorer, which looks like the packages are chained together.

推荐答案

在项目视图设置下拉菜单下取消选中隐藏空中间包":

Uncheck "Hide Empty Middle Packages" under the Project View settings dropdown:

这篇关于如何在 Intellij IDEA 中展开折叠包链?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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