netbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Lenz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NETBEANS-30) Code Suggestion for Query
Date Thu, 06 Jul 2017 20:02:00 GMT

    [ https://issues.apache.org/jira/browse/NETBEANS-30?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16077134#comment-16077134
] 

Christian Lenz commented on NETBEANS-30:
----------------------------------------

Often you write inline SQL inside a java class. I know this is not a good practice maybe,
but legacy code has this or some other codes:

String getSmth = "SELECT * FROM ...";

So in my opinion it is a must have to have Syntax highlighting AND code completion for SQL
inside strings. It is much better to see errors and typos etc. IntelliJ does this too and
it is very handy.

It should be an option maybe inside the editor, if the string, where the cursor is inside,
knows ahh here it is SQL, than a hint   a fix should come up to say, hey change to SQL inside
strings, and you will get syntax highlghting and code completion. This is what IntelliJ do
with, I think more than one language inside a string, like Regex or HTML, XML, SQL, whatever.
All those languages could be possible inside strings in Java, JS, PHP, and so on. So no default
behaviour, because some others like plain strings, others like SQL inside strings and so on.
A hint with detecting the language inside would be awesome :)

Regards

Chris

> Code Suggestion for Query
> -------------------------
>
>                 Key: NETBEANS-30
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-30
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: cnd - Code Completion, java - Editor
>    Affects Versions: Next
>         Environment: Any
>            Reporter: Alejandro Matos
>              Labels: features
>             Fix For: Next
>
>         Attachments: Captura_sin_título_070617_015957_PM.jpg
>
>
> When creating a {{Query}}, code suggestion should show the fields corresponding to the
entity I'm querying. This is available in IntelliJ IDEA.
> When typing the following:
> {{@Query("UPDATE Employee e SET e.password = :password WHERE e.")}}
> NetBeans should suggest the fields for the entity {{Employee}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message