[英]Changing the package name in all the java files to the existing package in eclipse
I have created some package. 我已经创建了一些包。 I had java files from previously created package. 我有以前创建的包中的Java文件。 Now, I want to change the name of package inside all java files to the package i just created in eclipse. 现在,我想将所有java文件中的包名称更改为我刚刚在eclipse中创建的包。 How to do that? 怎么做?
右键单击包资源管理器中的包名称,然后--->重构---->重命名
在Java透视图中,在“ 程序包资源管理器”或“ 项目资源管理器”中选择程序包,然后使用菜单栏或上下文菜单进行“ 重构” ->“ 重命名” ,或按快捷键:
Alt+Shift+R
右键单击您的包,然后选择“重构”并选择“重命名”。
Select package and press F2
. 选择程序包,然后按F2
。 In new wizard enter new package name and click on OK
. 在新向导中,输入新的程序包名称,然后单击“ OK
。
Select the package and press Alt+Shift+R gives you option for rename and rename it. 选择程序包,然后按Alt + Shift + R会提供重命名和重命名的选项。 it will change in all the java files. 它将在所有Java文件中更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.