Eclipse如何针对第三方框架进行代码完成? [英] How does Eclipse do code completion specific to third-party frameworks?

查看:186
本文介绍了Eclipse如何针对第三方框架进行代码完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Eclipse编辑器如何工作来启用代码完成?例如,在Hibernate属性文件的XML编辑器中,如果标签中的 ctrl - 空格,则会显示与hibernate相关的可能值的列表。

How does the Eclipse editor work to enable code completion? For example, within the XML editor for Hibernate property files, if I ctrl-space within a tag, a list of possible value relevant to hibernate will show up.

我知道XML编辑器是预配置的,可以了解xml标签,但是特定框架的标签如何? Eclipse如何知道这一点?

I understand that the XML editor is pre-configured to understand xml tag, but how about tag specific to a particular framework? How does Eclipse know about that?

推荐答案

我相信eclipse XML编辑器从任何引用的DTD获取内容辅助信息,或XMLSchema信息与XML文件相关联。尝试此实验:删除文件开头的DOCTYPE条目,并查看内容协助是否仍然有效。

I believe that the eclipse XML editor gets the content assist information from any referenced DTDs, or XMLSchema information it associates with the XML file. Try this experiment: Remove the DOCTYPE entry at the beginning of the file and see if content assist still works.

这篇关于Eclipse如何针对第三方框架进行代码完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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