Eclipse JSF + facelet - opening and editing a page slowly

When you open a JSF page (JSF + Apache Trinidad + facelet) in Eclipse (Helios), Eclipse freezes a few seconds before the page opens.

Also, when editing a page, checking the completion of the code / syntax is slow - for example, I type <tr : and again I need to wait a few seconds before I can continue to type or display tr-tags.

It is very disappointing that I have to wait every time when I print the opening tag and change it a lot.

I also use custom facelet tags.

What to do to avoid freezing / slowing down Eclipse? Do I need to change any configuration to speed it up?

+4
source share
5 answers

I tried using the XHTML editor instead of the JSF editor, and the freeze seemed to stop.

I right-clicked the * .xhtml * file and selected Open with-> XHTML Designer

Alternatively, you can change the way you open * .xhtml files by going to Window-> Preferences, then General-> Editors-> File Associations. Select the * .xhtml extension in the File Types: panel, and then select XHTML Designer in the Associated Editors: Panel window. To make XHTML Editor the default editor for * .xhtml files, click the "Default" button next to the "Related Editors: Panel" area.

+5
source

I had problems for several weeks and found a solution:

  • Install JBoss Tools> JBoss Web and Java EE Development> Visual Page Editor (this subpackage only)

After editing XHTML files with

  • Open with> JBoss Tools HTML Editor

It is faster and gives a better pageview.

+1
source

Some profiling shows that slowness is due to

org/eclipse/jst/jsf/context/symbol/internal/impl/IJavaTypeDescriptor2Impl.class

enter image description here

Associated with org.eclipse.jst.jsf.common_1.2.2.v201101211220.jar WebTool 1.2.2

The solution is to upgrade to the latest version of WebTool WebTool Update Page 3.6.2

Using the Refresh Webtool Luna Link

Adding metadata-complete=true to WEB-INF / faces-config.xml is a good way to prevent WebTool package class scans, but AnnotationConfigurator.createFacesConfig needs to be changed!

+1
source

Disable hyperlinks in the editor by following the path

Go to Window -> Preferences -> General -> Editors -> Text Editors -> Hyperlinking preference ,

uncheck the option Open Declaration

+1
source

For eclipse

Windows → Settings → Editor → File Associations

then select XHtml.

Once selected, three options will appear in the bottom window: select the HTML editor and click by default. This solved the problem for me.

Please remember to close all open XHtml pages and restart eclipse.

-1
source

Source: https://habr.com/ru/post/1344742/


All Articles