This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 228936 - Provide support for 'Injected Languages' on any String literal
Summary: Provide support for 'Injected Languages' on any String literal
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-24 08:50 UTC by tomzi
Modified: 2016-03-22 07:59 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomzi 2013-04-24 08:50:49 UTC
It is often the case that eg SQL statements are defined in some String literal and only later in the code being used.

see also 'Injected languages' on http://jetbrains.dzone.com/articles/top-20-code-completions-in-intellij-idea

eg.
class MyXlass {
static final SQL =
"select *  from products "
+ "where category like 'car' ";
MyService service;

public void execute() {
myService.find(SQL);
}
}

So usually all the SQL related boilerplate code is encapsulated and only the SQL stmt remains.

It would be great to have code completion for these String literals by:
1) call eg CTRL-space, 
2) select sth like 'Define Language'->'SQL'
3) select DB connection

now I should be able to use codecompletion like in .sql  files

Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Linux version 3.5.0-27-generic running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01