facebook

Code assist does not work in an HTML comment

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #237190 Reply

    rogue_dev
    Member
    <%
    String hello = "   hello   ";
    %>
    The greeting is <%= hello.trim() %>
    <!-- var is <%= hello.trim() %> -->

    In the above JSP code fragment, when you type in hello.t<CTRL-SPACE> you should get code assist for both examples. However, code assist does not work inside the <!– –> block.

    Ecplise 3.1, MyEcplise 4.0GA

    #237229

    Riyad Kalla
    Member

    Thank you for the report.

    #237265

    Riyad Kalla
    Member

    After further investigation it seems all editors (including the Java editor) behave in this way, this isn’t a bug, seems to be desired behavior.

    #237285

    rogue_dev
    Member

    Hmm, there is a bit of a difference between code comments (never executed) and HTML comments.

    HTML comments make it to the rendered page, and in fact can used to document certain behaviours which should not be displayed to the user.

    For instance I use it to show the execution time for a servlet. I start a timer when entering the servlet, and the JSP extracts the elapsed time. This is displayed in a comment at the very end of the page. I also use HTML comments for development time annotations such as Row skipped, etc.

    Ok, could I add this as an enhancement request?

    #237299

    Riyad Kalla
    Member

    This message has not been recovered.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Code assist does not work in an HTML comment

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