在 Eclipse (Helios) 中打开 JSF 页面(JSF + Apache Trinidad + Facelet)时,Eclipse 在打开页面之前会冻结几秒钟。
此外,在编辑页面时,代码完成/语法验证很慢 - 例如,我输入 : ,然后我必须等待几秒钟才能继续输入或显示 tr 标签。
每次输入开始标签时我都必须等待,这非常烦人,这让我的速度减慢了很多。
我还使用自定义 Facelet 标签。
如何避免 Eclipse 冻结/变慢?我是否需要更改任何配置才能加快速度?
When opening JSF page (JSF + Apache Trinidad + facelet) in Eclipse (Helios), Eclipse freezes for a few seconds before the page is opened.
Also when editing the page, code complete / syntax verification is slow - for example I type <tr
: and again I have to wait a few seconds before I can continue typing or tr tags are display.
It is very annoying that I have to wait each time when typing opening tag and slows me down a lot.
I am also using custom facelet tags.
What to do to avoid Eclipse freezing / slowing down? Do I have to change any configuration to speed it up?
发布评论
评论(5)
我尝试使用 XHTML 编辑器而不是 JSF 编辑器,冻结似乎已经停止。
我右键单击我的 *.xhtml 文件并选择“打开方式”->“XHTML 设计器”
另外,您可以通过转到“窗口”->“首选项”,然后选择“常规”->“编辑器”->“文件”来更改 *.xhtml 文件的打开方式协会。从“文件类型:”窗格中选择 *.xhtml 扩展名,然后在“关联的编辑器:”窗格中选择“XHTML 设计器”。要将 XHTML 编辑器设为 *.xhtml 文件的默认编辑器,请单击关联编辑器:窗格旁边的“默认”按钮。
I tried using the XHTML Editor instead of the JSF editor, and the freezing seems to have stopped.
I right clicked on my *.xhtml file and selected Open with->XHTML Designer
Also, you could change the way *.xhtml files are opened by going to Window->Preferences, then General->Editors->File Associations. Select the *.xhtml extension from the File types: pane, and then select XHTML Designer in the Associated editors: pane. To make the XHTML Editor the default editor for *.xhtml files, click the "Default" button next to the Associated editors: pane.
通过转到以下路径来关闭编辑器中的超链接
Go to Window ->首选项->一般->编辑->文本编辑器 ->超链接首选项
,取消选中选项“开放声明”
Turn off hyperlinks in your editor by going to the following path
Go to Window -> Preferences -> General -> Editors -> Text Editors -> Hyperlinking preference
,uncheck the option Open Declaration
我遇到这个问题已经好几个星期了,我找到了解决方案:
编辑器(仅限此子包)
可以使用以下方式编辑 XHTML 文件后:
速度更快,并为您提供更好的页面预览
I had this problems for weeks, and I've found a solution:
Editor (only this subpackage)
After you can edit XHTML files with:
It's faster and gives you a better page preview
一些分析表明,速度缓慢是由于
org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.class
其相关于WebTool 1.2.2 的 org.eclipse.jst.jsf.common_1.2.2.v201101211220.jar
解决方案是更新到最新的 WebTool 版本
WebTool 3.6.2 更新页面
使用 /webtools/repository/luna/" rel="nofollow noreferrer">更新 Webtool Luna 链接
将
metadata-complete=true
添加到 WEB-INF/faces-config.xml 是防止WebTool包类扫描的好方法,但是必须修改AnnotationConfigurator.createFacesConfig!Some profiling show that the slowness is due to
org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.class
Its related to org.eclipse.jst.jsf.common_1.2.2.v201101211220.jar of WebTool 1.2.2
The solution is to update to the last WebTool version
WebTool 3.6.2 update page
using Update Webtool Luna link
Adding
metadata-complete=true
to WEB-INF/faces-config.xml is a good way to prevent WebTool packages classes scanning, but AnnotationConfigurator.createFacesConfig must be modified !对于日食
,然后选择 XHtml。
选择后,底部窗口中将出现三个选项,选择 HTML 编辑器,然后单击默认。这为我解决了问题。
请确保关闭所有打开的 XHtml 页面并重新启动 eclipse。
For eclipse
then select XHtml.
After the selection there will be three options in the bottom window select HTML editor and click default. This solved the problem for me.
Please make sure to close all the opened XHtml pages and restart the eclipse.