强制内容类型在EclipsePDT中没有扩展的文件? [英] Force Content-Type on files with no Extension in EclipsePDT?

查看:97
本文介绍了强制内容类型在EclipsePDT中没有扩展的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Eclipse-PDT来处理我的PHP项目,当Eclipse无法识别我没有扩展名的php文件时,会发现它不方便。我们的项目包含许多没有文件扩展名的cli / bash风格的PHP脚本(无论什么原因)。这不会导致这些特定文件的代码完成,突出显示等。它将它们视为纯文本。

I use Eclipse-PDT to work on my PHP projects and find it inconvenient when Eclipse does not recognize my php files that have no extension. Our project contains many cli/bash-style php scripts that have no file-extension (for whatever reason). This results in no code-completion, highlighting, etc for these particular files. It treats them as plain-text.

有没有办法我可以将这些特定文件标记为PHP以使用PDT功能?

Is there a way I can mark these particular files as PHP to use the PDT features?

推荐答案

Swooper提供的解决方法(在他的例子中为perl)这里建议创建与扩展名的文件的链接,并通过这些链接编辑Eclipse中的文件。

A workaround suggested by Swooper (in his case for perl) here suggests to create links to the files with extensions and edit the files in Eclipse through those links.

如果您有很多扩展名文件,那么这个方法不是很理想,也可能很难,但是它会工作。

Not ideal and maybe hard if you have a lot of extensionless files, but it will work.

这篇关于强制内容类型在EclipsePDT中没有扩展的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆