How can I change top level package name in IntelliJ IDEA?

前端 未结 2 433
感情败类
感情败类 2020-12-23 16:01

I have a package structure: com.report.domain.model

I would like to change it to com.reporting.domain.model. When I select RefactorRename on pac

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 16:54

    In the Project Window, click on the Gears icon in the title bar Gears icon and deselect "Compact Empty Middle Packages". Then you can separately select the report package and rename it.

    See also: http://www.jetbrains.com/idea/webhelp/project-tool-window.html#d242351e401

    N.B. As of IntelliJ IDEA 2016.3, there is a bug in the menu and when the option is selected, it has a different label "Hide Empty Middle Packages", see https://youtrack.jetbrains.com/issue/IDEA-168362.

提交回复
热议问题