Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 135468 - Java code template can not be used within "string literal"
Java code template can not be used within "string literal"
Status: VERIFIED FIXED
Product: editor
Classification: Unclassified
Component: Completion & Templates
6.x
PC Windows XP
: P2 (vote)
: 6.x
Assigned To: Vitezslav Stejskal
issues@editor
61fixes3-fixed
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-21 07:32 UTC by mg11
Modified: 2008-09-04 13:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mg11 2008-05-21 07:32:37 UTC
Hi!

In NetBeans 6.1 it is not possible to use java code templates "string literal". You can reproduce this by typing:

  System.out.println("Hello World <position to insert code template>");

Put the course at the positions "<position to insert code template>" and try to call a code template. I used in NetBeans
6.0 quite frequently the code templates:

  Abbreviation:  si
  Expanded Text: '" + ${cursor} + "'	

  Abbreviation:  sin
  Expanded Text: " + ${cursor} + "	

But they do not work anymore with NetBeans 6.1 within "string literal". Thank you for the feedback.
Comment 1 mg11 2008-05-26 08:40:07 UTC
How does you response is going to look? How much time does it normally take until you get a feedback on a issue?

Thank you.
Comment 2 Jiri Prox 2008-05-27 07:05:20 UTC
The problem is that string literals has different mime-type than the rest of java file and the code template are
mime-type specific, unfortunately the string mime type is not listed by default. See issue 128019
Comment 3 Vitezslav Stejskal 2008-06-06 10:10:41 UTC
The same story as in issue #134205.
Comment 4 Vitezslav Stejskal 2008-06-07 10:01:12 UTC
http://hg.netbeans.org/main/rev/cbe2e7bfb41a
Comment 5 Quality Engineering 2008-06-07 16:10:08 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #243 build
Changeset: http://hg.netbeans.org/main/rev/cbe2e7bfb41a
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #135468 (fixed): enabling java code templates in java string literals
Comment 6 mg11 2008-06-18 07:48:30 UTC
Thank you for fixing the issue. 
How to i update the current NB 6.1 installation?
Comment 7 Jiri Prox 2008-06-18 12:47:13 UTC
verified, this is good candidate for patch3

mg11: the easies will be to wait, I've nominated this fix to be included in patch3. 
The other possibilities are 
- use dev builds
- get sources for 6.1 and apply the fix manually (it's quite simple fix) a compile.
Comment 8 rbalada 2008-07-18 13:52:31 UTC
I've transplanted the changeset http://hg.netbeans.org/main/rev/cbe2e7bfb41a into release61_fixes repository as
http://hg.netbeans.org/release61_fixes/rev/da634a2646ee
Comment 9 Jiri Prox 2008-08-21 08:42:07 UTC
verified in patch


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo