facebook

Problem with formatter in the xhtml/html visual designer

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #302285 Reply

    wciesiel
    Member

    I’m having strange problems with source-code formatter in MyEclipse visual (X)HTML editors (both HTML and XHTML)….

    I have an .xhtml file like this:

    
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
      template="WEB-INF/templates/main-template.xhtml">
    
      
      <p>
        <a href="#" onclick='showSourceDialog("#code3");'>show code</a>
      </p>
      <p>
        <a href="#" onclick='showSourceDialog("#code3");'>show code</a>
      </p>
      <p>
        <a href="#" onclick='showSourceDialog("#code3");'>show code</a>
      </p>
      <p>
        <a href="#" onclick='showSourceDialog("#code3");'>show code</a>
      </p>
    
    </ui:composition>
    
    

    If I format it (CTRL-SHIFT-F) I get something like this:

    
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
      template="WEB-INF/templates/main-template.xhtml">
    
    
      <p>
        <a href="#" onclick='showSourceDialog("#code3");'>show code</a>
      </p>
      <p>
        <a href="#" onclick='showSourceDialog("#code3");'>show code</a>
      </p>
      <p>
        <a href="#" onclick='showSourceDialog("#code3");'>show code</a>
      </p>
      <p>
        <a href="#" onclick=
        showSourceDialog("#code3");;
    >show code</a>
      </p>
    
    </ui:composition>
    

    As you see – strange things happen to the onclick attribute of the last A tag – it gets broken by the formatter (no quote characters, duplicated semicolon at the end)! At the start it’s EXACTLY the same as the ones above it – always last <a> gets broken…

    My version of MyEclipse: Version: 7.5
    Build id: 7.5-20090609

    #302292 Reply

    wciesiel,
    Thank you for bringing this up. I could replicate this issue.
    I have raised a PR with the dev team.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Problem with formatter in the xhtml/html visual designer

You must be logged in to post in the forum log in