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

Summary: Provide support for 'Injected Languages' on any String literal
Product: java Reporter: tomzi <tomzi>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal CC: markiewb, Saljack
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

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