Nikos
Nikos

Reputation: 427

Eclipse Project Types Definition/Configuration

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 Resource '/projectName' does not exist.

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 ?

Upvotes: 0

Views: 225

Answers (1)

greg-449
greg-449

Reputation: 111142

Your stack trace shows that there is no folder projectName in the workspace, so it does not look like the project exists at all.

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>

The IProjectDescription interface provides APIs for setting these values.

Upvotes: 1

Related Questions