简体   繁体   English

Eclipse悬停文档显示原始HTML

[英]Eclipse hover documentation displaying raw HTML

I am running Eclipse Indigo x64 on RedHat 6, and anytime the hover documentation pops up, the raw HTML is being displayed as plain text. 我在RedHat 6上运行Eclipse Indigo x64,只要弹出悬停文档,原始HTML就会显示为纯文本。 This is the case with my PHP projects, where under the preferences, PHP > Code Style > Formatter (PDT Tools), I have created my own Active profile. 这是我的PHP项目的情况,在首选项下,PHP>代码样式>格式化程序(PDT工具),我已经创建了自己的Active配置文件。 I noticed that with the Java Formatter profile, "Eclipe [built-in]", under the comments tab, there is an option box "Format HTML tags". 我注意到,使用Java Formatter配置文件“Eclipe [内置]”,在评论选项卡下,有一个选项框“格式化HTML标记”。 The PHP Formatter profile does not have a comments tab, so I believe this could be what the issue is. PHP Formatter配置文件没有注释选项卡,所以我相信这可能是问题所在。

Is there a way to specify this in the profile? 有没有办法在配置文件中指定它?

If anyone has resolved this issue, please let me know. 如果有人解决了这个问题,请告诉我。

The solution could be simply a one line addition to eclipse.ini . 解决方案可能只是eclipse.ini一行添加。 Here is what I did to solve it Open eclipse.ini (inside the eclipse folder) in a text editor and add 以下是我要解决的问题在文本编辑器中打开eclipse.ini (在eclipse文件夹中)并添加

-Dorg.eclipse.swt.browser.DefaultType=webkit

to it if not already there with a different value. 如果还没有具有不同的价值。

Make sure you have at least libwebkitgtk-1.0.0 or libwebkitgtk-3.0.0 or both installed on your system. 确保您的系统上至少安装了libwebkitgtk-1.0.0libwebkitgtk-3.0.0或两者。 ( you can do sudo apt-get install libwebkitgtk-1.0.0 on Ubuntu). (你可以在Ubuntu上做sudo apt-get install libwebkitgtk-1.0.0 )。

My guess is the content assist view relies on the internal web browser to parse its HTML content. 我的猜测是内容辅助视图依赖于内部Web浏览器来解析其HTML内容。 So if eclipse (and its settings) are not providing one then the raw HTML is displayed. 因此,如果eclipse(及其设置)未提供,则显示原始HTML。 This solution also fixed issues i had with other plugins that relied on internal web browsers like the Eclipse Colorer theme plugin 此解决方案还修复了我依赖内部Web浏览器(如Eclipse Colorer主题插件)的其他插件所遇到的问题

Hope it helps someone! 希望它可以帮到某人!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM