Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: GSP syntax/source highlighting

  1. #1

    Default GSP syntax/source highlighting

    With all due respect, the current syntax/source highlighting of GSP is not up to the mark. Is there any chance of getting it better in the upcoming 2.5.2 release? The reason I am asking this is - I am using the latest 2.5.2 snapshot of STS, but didn't see much of improvement regarding GSP highlighting.

  2. #2
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    The GSP editor inherits all syntax coloring support from the HTML editor. So, if you go to Preferences -> Web -> HTML Files -> Editor -> Syntax Coloring, there are some options there that you can choose.

    However, if there is something that is specifically bothersome to you that can't be fixed through the syntax coloring options in HTML files, then please attach a screenshot and describe what you are concerned about.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  3. #3

    Default

    However, if there is something that is specifically bothersome to you that can't be fixed through the syntax coloring options in HTML files, then please attach a screenshot and describe what you are concerned about.
    For example see the screen shot (http://dl.dropbox.com/u/7519826/error.jpg), don't understand why its showing errors. I am using STS 2.5.2.CI-R6442-B225.

  4. #4
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    What does the error show?
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  5. #5

    Default

    Simply nothing. In the markers' tab it just showing an error sign with no text/hints.

  6. #6
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    I'm going to need a bit more context here since I have not seen this before. Can you answer or try the following?

    1. Does this happen on all files, or just the one you showed me?
    2. Are there any other highlighting/error anomalies?
    3. Can you go to the Problems or Markers view? Do you see that error marker in the view? If so, right click and select delete. Does it come back?
    4. Try right clicking on the file and selecting "Validate". Does the error go away? Does it come back?
    5. Lastly, I know it's unlikely, but can you share a project that has this problem?
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  7. #7

    Default

    Does this happen on all files, or just the one you showed me?
    So far only in one file.
    Are there any other highlighting/error anomalies?
    In another gsp file and in a folder in the project tree STS showing error mark without any reason.
    Can you go to the Problems or Markers view? Do you see that error marker in the view? If so, right click and select delete. Does it come back?
    After deleting it would come back if I do a clean/build.
    Try right clicking on the file and selecting "Validate". Does the error go away? Does it come back?
    The error comeback if I validate after deleting from the Markers view.
    Lastly, I know it's unlikely, but can you share a project that has this problem?
    Check your private message.

  8. #8
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    I have your project and will take a look at it now. So, from what you are saying, this isn't directly a syntax highlighting issue, but really there is a spurious error showing up in one of your gsp files.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  9. #9
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    Several things to note here:

    1. It looks like the root cause of the no-message problem is that GSP scriptlets inside of a comment are not being properly parsed. The translator considers them an error.
    2. So, the file that is in your screenshot has an error because of a commented out line that begins <li>${rank.rank.rank}. Deleting this line will remove the error.
    3. There is a known bug with STS 2.5.2 and Grails 1.3.6 in that the hasErrors and renderErrors tag have the 'field' attribute marked as required, but they should not be. That is why you are seeing problems in some of your other files. See here: http://jira.codehaus.org/browse/GRAILS-7041 Please vote on the bug to get it fixed faster.


    At least now we know of the cause and a workaround for this problem. I'll file a jira for this and see how this can be fixed.
    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

  10. #10
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    748

    Default

    Andrew Eisenberg, Ph.D.
    SpringSource, a division of VMware
    SpringSource Tools Team
    More about AJDT, Groovy-Eclipse, and Grails tooling

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •