Skip to content

JPQL syntax - Text blocks #1353

Closed
Closed

Description

Suggestion

JPQL syntax is a great feature, it would be great if it supports:

  • Text blocks
  • String concatenation

In the following image you can see that right now isn't supported
image

Activity

  1. nickzhums commented on Jun 5, 2024

    @nickzhums
    Member
  2. martinlippert commented on Jun 5, 2024

    @martinlippert

    I would like to suggest to move this issue over to https://github.com/spring-projects/sts4/issues/ where the actual feature is being implemented... :-)

  3. raulvaldoleiros commented on Jun 5, 2024

    @raulvaldoleiros
  4. martinlippert commented on Jun 5, 2024

    @martinlippert

    raulvaldoleiros Thanks for moving it, much appreciated !!!

  5. BoykoAlex commented on Jun 5, 2024

    @BoykoAlex
    Contributor

    raulvaldoleiros text blocks are supported in the latest version of the spring boot tools extension I believe:
    Screenshot 2024-06-05 at 10 14 30

    As for string concatenation it'd take some effort to support it.

  6. raulvaldoleiros commented on Jun 7, 2024

    @raulvaldoleiros

    Currently I have the version 1.54.0 installed
    image
    I don't have a newest version to install
    image
    Maybe I just need to wait for the next stable release.

  7. martinlippert commented on Jun 7, 2024

    @martinlippert

    raulvaldoleiros There is a button on the extension page to switch to a pre-release version.

  8. raulvaldoleiros commented on Jun 7, 2024

    @raulvaldoleiros

    Martin Lippert (@martinlippert) The pre-release works as expected.
    Thanks for the hint :)

  9. github-actions commented on Nov 4, 2025

    @github-actions

    Hi Raul Valdoleiros (@raulvaldoleirospowerdot), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    Suggestion

    Currently the Java textmate grammar in VS Code (used by the Red Hat Java extension) does not recognize JPQL inside Java text blocks or concatenated strings as a distinct language. You have two options:

    • Fallback to classic concatenation
      @Query(
        "select a from User" +
        " where a.id = :id"
      )
    • Use text blocks without highlighting
      @Query("""
        select a from User
        where a.id = :id
      """)
      until JPQL-injection support is added.

    No built-in feature or workaround currently exists to inject JPQL syntax highlighting into text blocks. You can track similar requests and add your feedback to help prioritize this feature in the language server.

    Labels

    • enhancement
    • syntax-highlighting
    • text-blocks
    • jpql

    Duplicate

    No duplicates found.

    Other references with low confidence

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

  10. martinlippert commented on Nov 4, 2025

    @martinlippert

    This is already implemented and released as part of the https://github.com/spring-projects/spring-tools/, at least for Spring related projects, so feel free to close this issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions