You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Christian Lenz (JIRA)" <ji...@apache.org> on 2018/11/09 14:36:00 UTC

[jira] [Comment Edited] (NETBEANS-1648) Support for adding syntax highlighing and code completion of different languages inside strings (Java)

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

Christian Lenz edited comment on NETBEANS-1648 at 11/9/18 2:35 PM:
-------------------------------------------------------------------

And not only syntax highlighting should be possible, code completion too but only after changing the supported language.


was (Author: chrizzly):
And not only syntax highlighting should be possible, code completion too.

> Support for adding syntax highlighing and code completion of different languages inside strings (Java)
> ------------------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-1648
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1648
>             Project: NetBeans
>          Issue Type: New Feature
>          Components: editor - Other, java - Editor
>    Affects Versions: Next
>            Reporter: Christian Lenz
>            Priority: Major
>
> As of today, we can have a lot of languages inside strings like SQL or JS or HTML. If we have to add such code inside strings in Java, it is really hard to "debug" or to figure out what you have forgotton and not really readable because it is still a string.
> For this, NetBeans has embedded languages support and to not say I want exact this language inside a string, which doesn't make sense, because In Java I can have HTML, XML, JS, SQL and whatever inside of a string, I should change it via a hint inside of the editor.
> So when I have a java file with code like this:
> {code:java}
> String TestSQL = "SELECT * FROM";
> {code}
> I would expect, that the code looks like a normal string, but when I click inside the string, I should get a hint where I can "Choose embedded language". After running this hint, a very small not disturbing dialog (Like the insert code dialog from java) should come up and should show me all supported languages like Java, SQL, PHP, HTML, XML, CSS, JS, Regex, etc.
> This is a dynamic approach because setting it to a default language is not right. In the next line maybe you have this code:
> {code:java}
> String MyWhatever = "<h3>Nice</h3>";
> {code}
> And it should not look like SQL, it should still looks like a string, until I want to change it to HTML.
> This is the same approach as IntelliJ does and it works very well: https://d3nmt5vlzunoa1.cloudfront.net/phpstorm/files/2018/09/DQL_inject.gif
> Maybe not every language makes sense there and an option for that is needed as well but for an MVP all is ok. IMHO.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists