为何Eclipse中 按 F3 无效

一般是因为本身的 工程 建得不对, 没有声明为 JAVA 或 PHP 类型工程。php

 

例如, PHP 工程的 .project 文件中的内容若是以下, F3 应该就能够起做用了。java

 

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
 <name>projectName</name>
 <comment></comment>
 <projects>
 </projects>
 <buildSpec>
  <buildCommand>
   <name>org.eclipse.dltk.core.scriptbuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>org.eclipse.php.core.PhpIncrementalProjectBuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
  <buildCommand>
   <name>org.eclipse.wst.validation.validationbuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
 </buildSpec>
 <natures>
  <nature>org.eclipse.php.core.PHPNature</nature>
 </natures>
</projectDescription>spring

 

 

又例如,JAVA Spring Tomcat 项目的 .project 文件中的内容以下:tomcat

 

<?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.springframework.ide.eclipse.core.springbuilder</name>
   <arguments>
   </arguments>
  </buildCommand>
 </buildSpec>
 <natures>
  <nature>org.springframework.ide.eclipse.core.springnature</nature>
  <nature>org.eclipse.jdt.core.javanature</nature>
  <nature>com.sysdeo.eclipse.tomcat.tomcatnature</nature>
 </natures>
</projectDescription>eclipse

相关文章
相关标签/搜索