java project 类型,将Eclipse项目类型从一般转换为Java

I'm taking over another team's project and am experiencing some bizarre Eclipse issues.

I'm using Subversive as my plugin, and when I go to check the trunk out it brings me to a standard "Check Out As" dialog where it allows me to select the check out method, and the only one that works for me (or is applicable) is the last option (Check out as a project with the name specified).

So I specify the name, and the project then checks out as normal and all is well, except...

Although this is supposed to be a Java project (WARs up into a Java web app), it seems that the team that made the project created it as a general project (by going to Project > Properties > Resource > Type = 'Project').

As such, none of the typical features that come with a Java project are enabled, including (but certainly not limited to):

F3 doesn't work, even if the type is defined inside the same package (folder in this case) as the type I'm currently editing (because Eclipse isn't treating this like a Java project)

Can't search for Java classes

Can't build from inside Eclipse (because there are not source packages, only folders), etc.

This list goes on and on...

So my question(s) are:

Is there a way to convert this General Project type into a Java Project without having to make a whole new project and copying everything over?

I'm wondering if I checked the project out incorrectly, but none of the checkout methods (in Subversive) were really applicable: (1) Check out as a project configured using the New Project Wizard (why check out as a new project?!?), (2) Find projects in the children of the selected resource (no), (3) Check out as a folder into an existing project (no).

Is there any other avenue I could take here to "Java-ify" this project?

解决方案

Under Project Properties -> Project Facets -> Convert to faceted form... you can select Java - this will add the Java functionalities to your project. There you can also add other facets like Dynamic Web Module if necessary.

From what you have written the project was checked out correctly. The option Check out as a project configured using the New Project Wizard is applicable when the .project file does not exist in the repository and you have to select the project type manually. It will only create a new Eclipse project locally.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值