将Eclipse项目类型从一般转换为Java [英] Convert Eclipse project type from general to Java

查看:1177
本文介绍了将Eclipse项目类型从一般转换为Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在接管另一个团队的项目,并遇到一些奇怪的Eclipse问题。



我使用Subversive作为我的插件,当我去查看干出来,它带给我一个标准的检查为对话框,它允许我选择检出方法,唯一适用于我(或适用)是最后一个选项(检查作为一个名称指定的项目)。



所以我指定名称,项目然后正常检查,一切都很好,除了...



虽然这是一个Java项目(WARs up into a Java web app),但它似乎,使该项目的团队将其创建为一般项目(转到 Project> Properties> Resource> Type ='Project'



因此,启用了Java项目附带的典型功能,包括(但不限于):




  • F3 即使类型是在同一个包(在这种情况下的文件夹)中定义的,因为它正在正在编辑的类型(因为Eclipse不像Java项目那样对待它)

  • 无法搜索Java类

  • 无法从Eclipse内部构建(因为没有源包,只有文件夹)等。




所以我的问题是:




  • 有没有办法将这个一般项目类型转换成一个 Java项目,而不必做一个全新的项目和复制一切?

  • 我想知道我是否错误地检查了项目,但没有一个检查方法(在颠覆中)是真正适用的:(1)配置的项目查看(为什么要作为新项目检查?)?(2)查找所选子项中的项目资源(否),(3)检查ou t作为现有项目中的文件夹(否)。

  • 我可以在这里使用Java-ify这个项目吗? li>

解决方案

项目属性 - >项目方面 - >转换为分面... 您可以选择 Java - 这将将Java功能添加到您的项目中。在这里您还可以添加其他方面,如动态Web模块,如有必要。



从您写的项目是签出正确。选项 .project 文件不存在时,可以使用新建项目向导配置的项目签出存储库,您必须手动选择项目类型。它只会在本地创建一个新的Eclipse项目。


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.

这篇关于将Eclipse项目类型从一般转换为Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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