the resource is not on the build path of a php project

Thanks to the author, the original address: http://blog.csdn.net/qinglianluan/article/details/30068491

A project already exists, for example, it is called myproject and you import it into eclipse. Whether you implement it through import or create a new myproject with the same name and under the same workspace to import the project, you may encounter The trouble is that when you hold down the 'Ctrl' key and click on an integrated class or method, the resource is not on the build path of a php project will be prompted

So what to do: find the location of your project file, for example, there must be a file ".project" under my project myproject, open it with notepad and you will see

 

<projectDescription>
    <name>myproject</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    </buildSpec>
    <natures>
    </natures>
</projectDescription>

 

Replace it all with:

 

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>myproject</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>net.sourceforge.phpeclipse.parserbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.validation.validationbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.dltk.core.scriptbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.zend.php.zendserver.deployment.core.DeploymentBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.php.core.PHPNature</nature>
        <nature>org.zend.php.zendserver.deployment.core.DeploymentNature</nature>
        <nature>net.sourceforge.phpeclipse.phpnature</nature>
    </natures>
</projectDescription>

 

Note that this xml file may be different for different classes of eclipse, so what should you do? You just need to create a new project, then copy the contents of the generated ".project" file, and then replace your purpose project ".project" file and make small changes to <name>your project name<name> on it

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326610120&siteId=291194637
Recommended