Eclipse:非 XML 文件的 XML 语法着色

发布于 2024-08-02 09:44:35 字数 173 浏览 3 评论 0原文

在我之前(也是第一次)尝试 Eclipse 时,我继承了另一个开发人员的工作站和设置。现在,我正在尝试从头开始设置一个新的 Eclipse 实例,但反过来,我却摸不着头脑。

如何为不以 .xml 结尾的文件(在本例中特别是 vxml 文件)获取 XML 样式的语法着色?

谢谢!
IVR复仇者

In my previous (and first) foray into Eclipse, I inherited another Developer's workstation and setup. Now, I'm trying to setup a new Eclipse instance from scratch, and, in turn, am scratching my head.

How do I go about getting XML-style syntax coloring for files that do not end in .xml (specifically vxml files, in this case)?

Thanks!
IVR Avenger

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

护你周全 2024-08-09 09:44:35

您可以定义哪些扩展映射到哪些内容类型;这应该可以帮助 Eclipse 完成您想要的操作。

为此,请转到:窗口 >首选项>一般>内容类型

然后在屏幕右侧找到“XML”内容类型。

当您单击它时,对话框底部将出现一个扩展列表。

单击“添加...”按钮,然后在弹出窗口中定义您的扩展名:*.vml

单击“确定”关闭首选项窗口...

...并且 .vml 文件现在应被视为 XML ;-)

You can define which extensions are mapped to which content-types ; this should help Eclipse do what you want.

For that, go to : Window > Preferences > General > Content-types

Then find the "XML" content-type on the right on the screen.

When you click on it, there will be a list of extensions at the bottom of the dialog box.

Click the "Add..." button, and define your extension here in the popup : *.vml

Click OK to close the preferences window...

... And .vml files should now be considered as XML ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文