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?
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.
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
I had this problems for weeks, and I've found a solution:
- Install JBoss Tools > JBoss Web and Java EE Development > Visual Page Editor (only this subpackage)
After you can edit XHTML files with:
- Open with > JBoss Tools HTML Editor
It's faster and gives you a better page preview
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 !
For eclipse
Windows -> Preferences -> Editor -> File associations
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.
精彩评论