Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries that are divided into multiple String concatenations, are not syntax highlighted. #1391

Closed
ahbali opened this issue Oct 19, 2024 · 1 comment

Comments

@ahbali
Copy link

ahbali commented Oct 19, 2024

I don't know if this is a Bug or a feature request.

Describe the bug
sometimes i divide Queries into multiple lines to be more readable.
The queries that are in a single string literal are syntax highlighted but when divided into multiple string literals concatenations, then there they stop being colorized.
PS: i know that i can use text blocks, but unfortunately the project is using java 11.

To Reproduce
change something like this:

@Query("SELECT c FROM Client c JOIN c.chambres chambre WHERE chambre.id = :chambreId")
Set<Client> findByChambreId(@Param("chambreId") Long chambreId);

to this:

@Query("SELECT c \n" +
       "FROM Client c \n" +
       "   JOIN c.chambres chambre \n" +
       "WHERE chambre.id = :chambreId")
Set<Client> findByChambreId(@Param("chambreId") Long chambreId);

or this:

@Query("SELECT c " +
       "FROM Client c " +
       "   JOIN c.chambres chambre " +
       "WHERE chambre.id = :chambreId")
Set<Client> findByChambreId(@Param("chambreId") Long chambreId);

Sample

check the file ClientRepository.java in this repo

@BoykoAlex
Copy link
Contributor

Duplicate of #1262 - there are at least 3 requests to support concatenated strings... Perhaps it's time to implement this support

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

No branches or pull requests

2 participants