gpt4 book ai didi

php - 使 Eclipse 像 PHP 一样查看不同的文件扩展名

转载 作者:IT王子 更新时间:2023-10-29 01:15:46 26 4
gpt4 key购买 nike

我有几个文件扩展名,如 .module,我希望 Eclipse 将其理解为 PHP - 因此我可以获得与我希望的相同的语法突出显示、代码完成等功能我正在编辑一个 .php 文件。我该怎么做?

我转到Window >> Preferences >> General >> File Associations 并将*.module 添加到文件类型列表中。当我点击 *.module 时,它现在说关联的编辑器是 PHP 编辑器和文本编辑器。

但是,当我打开 *.module 文件进行编辑时,它给我一个错误信息:

Unsupported content type in editor. To associate a file extension with a supported content type, please see the Content Types Preferences Page.

我做错了什么?

已修复:重新启动 Eclipse,现在它可以工作了。

最佳答案

前往窗口 -> 首选项。深入到 General -> Editors -> File Associations。从这里您可以添加您的扩展(例如 *.module)并将它们与您首选的 PHP 编辑器相关联。

然后重新启动 Eclipse 以使更改生效。

关于php - 使 Eclipse 像 PHP 一样查看不同的文件扩展名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1959606/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com