Eclipse项目类型定义/配置 [英] Eclipse Project Types Definition/Configuration
问题描述
我正在尝试使用具有自己不同的项目类型的eclipse的修改版本。对于某些项目类型,当我创建一个项目,重新启动然后删除(从光盘删除未选中)项目我得到以下错误:
I am trying to work with a modified version of eclipse that has it's own different project types. For some project types when I Create a project, restart and then delete(with the delete from disc not checked) the project I get the following error:
org.eclipse.core.internal.resources.ResourceException: Resource '/projectName' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215)
at org.eclipse.core.internal.resources.Project.checkAccessible(Project.java:147)
at org.eclipse.core.internal.resources.Resource.checkAccessibleAndLocal(Resource.java:221)
at org.eclipse.core.internal.resources.Resource.touch(Resource.java:1949)
at org.eclipse.core.internal.resources.Project.touch(Project.java:1403)
at org.eclipse.wst.jsdt.internal.core.SetContainerOperation.execute(SetContainerOperation.java:122)
at org.eclipse.wst.jsdt.core.JavaScriptCore.setJsGlobalScopeContainer(JavaScriptCore.java:3901)
at org.eclipse.wst.jsdt.launching.JREContainerInitializer.initialize(JREContainerInitializer.java:48)
at org.eclipse.wst.jsdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2214)
at org.eclipse.wst.jsdt.internal.core.JavaModelManager$6.run(JavaModelManager.java:2144)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.wst.jsdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2160)
at org.eclipse.wst.jsdt.internal.core.JavaModelManager.getJsGlobalScopeContainer(JavaModelManager.java:1536)
at org.eclipse.wst.jsdt.core.JavaScriptCore.getJsGlobalScopeContainer(JavaScriptCore.java:1319)
at org.eclipse.wst.jsdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2747)
at org.eclipse.wst.jsdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2026)
at org.eclipse.wst.jsdt.core.JavaScriptCore.initializeAfterLoad(JavaScriptCore.java:2655)
at org.eclipse.wst.jsdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:32)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!SUBENTRY 1 org.eclipse.core.resources 4 368 2015-07-06 13:39:58.865
!MESSAGE资源/ projectName不存在。
!SUBENTRY 1 org.eclipse.core.resources 4 368 2015-07-06 13:39:58.865 !MESSAGE Resource '/projectName' does not exist.
我的怀疑是,eclipse不会将其视为项目或其他东西。所以问题如下:有人知道eclipse如何定义可接受/可用的项目类型?
My suspicion is that eclipse does not recognize that as a project or something. So the question is the following : Does anybody know how does eclipse defines the acceptable/available project types ?
推荐答案
您的堆栈跟踪显示没有文件夹 projectName
工作区,所以它看起来不像项目存在。
Your stack trace shows that there is no folder projectName
in the workspace, so it does not look like the project exists at all.
.project
文件的内容项目文件夹定义了一个项目的自然和建设者。例如,Java插件项目 .project
文件可能如下所示:
The contents of the .project
file in the project folder defines what 'natures' and 'builders' a project has. For example a Java plug-in project .project
file might look like this:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>projectName</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
IProjectDescription
界面提供API设置这些值。
The IProjectDescription
interface provides APIs for setting these values.
这篇关于Eclipse项目类型定义/配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!