Better formatting of xhtml files

4

Given the excerpt from my file .xhtml :

<h:panelGrid id="camposPesquisa" columns="2">
    <h:outputLabel value="#{msg['nome']}: " />
    <p:inputText value="#{naturemb.arg}" />
</h:panelGrid>
<h:panelGrid id="botoes" columns="2" styleClass="botoesCrud">
    <p:commandButton actionListener="#{naturemb.pesquisar}"
        value="#{msg['pesquisar']}" ajax="false"
        update="cadastro,pesquisa" />
    <p:commandButton actionListener="#{naturemb.novo}"
        value="#{msg['novo']}" ajax="false" update="cadastro"
        styleClass="separadorBotoes" />
</h:panelGrid>

Note that when indenting Eclipse , there are many line breaks in the attributes. How can I configure so that I do not break so much of a line?

Ex: 5 attributes on the same line, etc?

    
asked by anonymous 28.09.2016 / 19:46

1 answer

1

Yes there are options for this.

1 - First check whether the indentation is breaking each attribute per line in:

Window>Preferences>Web>HTML files>Editor

Uncheck split multiples attributes ...

2 - Increase the size of characters per line by changing the number of% with% that is 100 (in the image) to an appropriate value for your needs.

    
28.09.2016 / 20:25