您能否禁止单个无法解析/编译的 php 文件在 Eclipse 中显示为错误?
我们目前使用 Aptana for PHP 和 Eclipse for Java。虽然 Aptana 是基于 Ecplise 构建的,但当 PHP 文件不会解析/编译时,它会以不同的方式处理它们。我很想同时使用 Eclipse,但我不知道如何抑制应该被忽略的错误。
我们对所有项目都使用 simpletest,因此我们将其包含在我们的“核心”项目中并将其签入 SVN。 Simpletest 包含“test_with_parse_error.php”,这是一个无效的 php 文件。在 Aptana 中,在您打开项目之前,该项目不会显示为有错误(也没有任何 php 文件)。此时,您可以看到该文件有错误,但整个项目并没有改变(该文件所在的目录上没有“红色X”)。
看起来好像 Aptana 将文件夹视为常规文件夹,而 Eclipse (galileo) 将 PHP 项目中的所有文件夹视为“源文件夹”。有没有办法指定在查找错误时哪些文件夹应被视为“源”,哪些不应被视为“源”?
We are currently using Aptana for PHP and Eclipse for Java. While Aptana is built on Ecplise, it treats PHP files differently when they won't parse/compile. I'd love to use Eclipse for both, but I can't figure out how to suppress errors that should be ignored.
We use simpletest for all of our projects so we have it included in our "core" project and check it into SVN. Simpletest includes "test_with_parse_error.php", which is an invalid php file. In Aptana, the project does not show as having an error (nor does any php file) until you open it. At that point, you can see that the file has an error, but the project as a whole doesn't change (there is no "red X" on the directories where the file is located).
It almost appears as if Aptana treats folders as regular folders while Eclipse (galileo) treats all folders in a PHP project as "source folders". Is there a way to specify which folders should be considered "source" and which should not when looking for errors?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从 eclipse PDT 2.0 开始,您可以使用 PHP 构建路径配置。这也将抑制来自无效文件的警告。
starting with eclipse PDT 2.0, you can exclude resources from the build process using the PHP Build Path configuration. this will also suppress warnings from the invalid file.
如果 Aptana 是在 Eclipse 上构建的,难道您不能将其配置为显示 Java 视图吗?我可以配置我的 Zend studio(也是基于 Eclipse 构建的,非常类似于 Aptana)来显示 Java 视图/工作区并使用它。
If Aptana is build on Eclipse, couldn't you just configure it to show the Java view? I could configure my Zend studio (also built on Eclipse and very much like Aptana) to show the Java view/workspace and work with it..