[hg] main-silver: Code completion modified to show a list of tem...

  • From: Dusan Balek < >
  • To: ,
  • Subject: [hg] main-silver: Code completion modified to show a list of tem...
  • Date: Tue, 17 Sep 2013 17:28:15 -0700

changeset 514f277e3674 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/514f277e3674
description:
        Code completion modified to show a list of templates that apply to 
the current editor file (see issue #167108).

diffstat:

 
editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java
     |   6 +-
 
editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionProvider.java
 |   8 +-
 java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java     
                      |   2 +-
 
java.editor/src/org/netbeans/modules/java/editor/resources/DefaultAbbrevs.xml 
                     |  54 +++++-----
 4 files changed, 39 insertions(+), 31 deletions(-)

diffs (278 lines):

diff --git 
a/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java
 
b/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java
--- 
a/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java
+++ 
b/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionItem.java
@@ -87,7 +87,11 @@
     }
     
     private String getLeftText() {
-        return 
CodeTemplateApiPackageAccessor.get().getSingleLineText(codeTemplate).trim();
+        String description = codeTemplate.getDescription();
+        if (description == null) {
+            description = 
CodeTemplateApiPackageAccessor.get().getSingleLineText(codeTemplate);
+        }
+        return description.trim();
     }
     
     private String getRightText() {
diff --git 
a/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionProvider.java
 
b/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionProvider.java
--- 
a/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionProvider.java
+++ 
b/editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/CodeTemplateCompletionProvider.java
@@ -182,13 +182,17 @@
                 }
             }
             
+            if (identifierBeforeCursor == null) {
+                identifierBeforeCursor = ""; //NOI18N
+            }
+            
             if (langPath == null) {
                 langPath = NbEditorUtilities.getMimeType(doc);
             }
 
             queryCaretOffset = caretOffset;
-            queryAnchorOffset = (identifierBeforeCursor != null) ? 
caretOffset - identifierBeforeCursor.length() : caretOffset;
-            if (langPath != null && identifierBeforeCursor != null) {
+            queryAnchorOffset = caretOffset - 
identifierBeforeCursor.length();
+            if (langPath != null) {
                 String mimeType = DocumentUtilities.getMimeType(component);
                 MimePath mimePath = mimeType == null ? MimePath.EMPTY : 
MimePath.get(mimeType);
                 Preferences prefs = 
MimeLookup.getLookup(mimePath).lookup(Preferences.class);
diff --git 
a/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java 
b/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java
--- a/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java
+++ b/java.editor/src/org/netbeans/modules/editor/java/JavaCompletionItem.java
@@ -647,7 +647,7 @@
 
         @Override
         public int getSortPriority() {
-            return smartType ? 600 - SMART_TYPE : 600;
+            return smartType ? 670 - SMART_TYPE : 670;
         }
 
         @Override
diff --git 
a/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultAbbrevs.xml
 
b/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultAbbrevs.xml
--- 
a/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultAbbrevs.xml
+++ 
b/java.editor/src/org/netbeans/modules/java/editor/resources/DefaultAbbrevs.xml
@@ -76,11 +76,11 @@
     <codetemplate abbreviation="psfi"><code><![CDATA[${no-format}private 
static final int ]]></code></codetemplate> 
     <codetemplate abbreviation="psfs"><code><![CDATA[${no-format}private 
static final String ]]></code></codetemplate> 
     <codetemplate abbreviation="psfb"><code><![CDATA[${no-format}private 
static final boolean ]]></code></codetemplate> 
-    <codetemplate abbreviation="pst" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"><code><![CDATA[printStackTrace();]]></code></codetemplate>
 
+    <codetemplate abbreviation="pst" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION"><code><![CDATA[printStackTrace();]]></code></codetemplate>
 
     <codetemplate abbreviation="pu"><code><![CDATA[${no-indent}public 
]]></code></codetemplate> 
     <codetemplate abbreviation="re"><code><![CDATA[${no-indent}return 
]]></code></codetemplate>
-    <codetemplate abbreviation="serr" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"><code><![CDATA[System.err.println("${cursor}");]]></code></codetemplate>
 
-    <codetemplate abbreviation="sout" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"><code><![CDATA[System.out.println("${cursor}");]]></code></codetemplate>
 
+    <codetemplate abbreviation="serr" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION"><code><![CDATA[System.err.println("${cursor}");]]></code></codetemplate>
 
+    <codetemplate abbreviation="sout" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION"><code><![CDATA[System.out.println("${cursor}");]]></code></codetemplate>
 
     <codetemplate abbreviation="st"><code><![CDATA[${no-indent}static 
]]></code></codetemplate> 
     <codetemplate abbreviation="sw"><code><![CDATA[switch (${var 
instanceof="java.lang.Enum"}) {
         case ${val completionInvoke}:
@@ -102,7 +102,7 @@
         ${cursor}
     }
 ]]></code></codetemplate>
-    <codetemplate abbreviation="do" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"><code><![CDATA[do
 {
+    <codetemplate abbreviation="do"><code><![CDATA[do {
             ${cursor}
         } while (${expr instanceof="boolean" default="true"});
     ]]></code></codetemplate>
@@ -119,7 +119,7 @@
     <codetemplate abbreviation="Psfb"><code><![CDATA[${no-format}public 
static final boolean ]]></code></codetemplate> 
     <codetemplate 
abbreviation="St"><code><![CDATA[${no-indent}String]]></code></codetemplate>
     <!-- #173655 partial fix -->
-    <codetemplate abbreviation="as" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"><code><![CDATA[assert
 ${exp default="true" instanceof="boolean"};]]></code></codetemplate>
+    <codetemplate abbreviation="as"><code><![CDATA[assert ${exp 
default="true" instanceof="boolean"};]]></code></codetemplate>
     <codetemplate abbreviation="na"><code><![CDATA[${no-indent}native 
]]></code></codetemplate>
     <codetemplate abbreviation="tr"><code><![CDATA[${no-indent}transient 
]]></code></codetemplate>
     <!-- Some bug in template processing always appends 4 spaces after 
volatile, if there is a single space in the template -->
@@ -129,7 +129,7 @@
     <codetemplate 
abbreviation="su"><code><![CDATA[${no-indent}super]]></code></codetemplate>
     <codetemplate abbreviation="pvb"><code><![CDATA[${no-format}private 
volatile boolean ]]></code></codetemplate>
     <!-- #108167 -->
-    <codetemplate abbreviation="for" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="for" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[for (int ${IDX newVarName default="i"} = 0; ${IDX} < ${MAX 
default="10"}; ${IDX}++) {
 ${selection}${cursor}
@@ -138,7 +138,7 @@
         </code>
     </codetemplate>
 
-    <codetemplate abbreviation="fori" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="fori" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[for (int ${IDX newVarName default="idx"} = 0; ${IDX} < ${ARR array 
default="arr"}.length; ${IDX}++) {
    ${TYPE rightSideType default="Object"} ${ELEM newVarName default="elem"} 
= ${TYPE_CAST cast default="" editable=false}${ARR}[${IDX}];
@@ -147,7 +147,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="forc" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="forc" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[for (${IT_TYPE rightSideType type="java.util.Iterator" 
default="Iterator" editable=false} ${IT newVarName default="it"} = ${COL 
instanceof="java.util.Collection" default="col"}.iterator(); 
${IT}.hasNext();) {
    ${TYPE rightSideType default="Object"} ${ELEM newVarName default="elem"} 
= ${TYPE_CAST cast default="" editable=false}${IT}.next();
@@ -156,7 +156,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="forl" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="forl" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[for (int ${IDX newVarName default="idx"} = 0; ${IDX} < ${LIST 
instanceof="java.util.List" default="lst"}.size(); ${IDX}++) {
    ${TYPE rightSideType default="Object"} ${ELEM newVarName default="elem"} 
= ${TYPE_CAST cast default="" editable=false}${LIST}.get(${IDX});
@@ -165,7 +165,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="forv" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="forv" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[for (int ${IDX newVarName default="idx"} = 0; ${IDX} < ${VECTOR 
instanceof="java.util.Vector" default="vct"}.size(); ${IDX}++) {
    ${TYPE rightSideType default="Object"} ${ELEM newVarName default="elem"} 
= ${TYPE_CAST cast default="" editable=false}${VECTOR}.elementAt(${IDX});
@@ -174,7 +174,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="fore" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="fore" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[for (${TYPE iterableElementType default="Object" editable=false} 
${ELEM newVarName default="elem"} : ${ITER iterable default="col"}) {
 ${selection}${cursor}
@@ -182,16 +182,16 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="forst" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="forst" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[for (${STR_TOK type="java.util.StringTokenizer" 
default="StringTokenizer" editable=false} ${TOKENIZER newVarName} = new 
${STR_TOK}(${STRING instanceof="java.lang.String"}); 
${TOKENIZER}.hasMoreTokens();) {
     String ${TOKEN default="token"} = ${TOKENIZER}.nextToken();
-    ${cursor}
+${selection}${cursor}
 }
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="inst" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="inst" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[if (${EXP instanceof="java.lang.Object" default="exp"} instanceof 
${TYPE default="Object"}) {
    ${TYPE} ${VAR newVarName default="obj"} = (${TYPE})${EXP};
@@ -205,7 +205,7 @@
         <![CDATA[System.out.println("${EXP instanceof="<any>" default="exp"} 
= " + ${EXP});]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="whilen" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="whilen" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[while (${ENUM instanceof="java.util.Enumeration" 
default="en"}.hasMoreElements()) {
    ${TYPE rightSideType default="Object"} ${ELEM newVarName default="elem"} 
= ${TYPE_CAST cast default="" editable=false} ${ENUM}.nextElement();
@@ -214,7 +214,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="whileit" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="whileit" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[while (${IT instanceof="java.util.Iterator" 
default="it"}.hasNext()) {
    ${TYPE rightSideType default="Object"} ${ELEM newVarName default="elem"} 
= ${TYPE_CAST cast default="" editable=false} ${IT}.next();
@@ -223,7 +223,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="iff" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"
 descriptionId="CT_iff">
+    <codetemplate abbreviation="iff" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION"
 descriptionId="CT_iff">
         <code>
 <![CDATA[if (${EXP instanceof="boolean" default="true"}) {
 ${selection}${cursor}
@@ -231,7 +231,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="ifelse" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"
 descriptionId="CT_ifelse">
+    <codetemplate abbreviation="ifelse" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION"
 descriptionId="CT_ifelse">
         <code>
 <![CDATA[if (${EXP instanceof="boolean" default="true"}) {
 ${selection}${cursor}
@@ -240,7 +240,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="whilexp" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="whilexp" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[while (${EXP instanceof="boolean" default="true"}) { 
 ${selection}${cursor}
@@ -248,7 +248,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="dowhile" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="dowhile" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[do { 
 ${selection}${cursor}
@@ -266,7 +266,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="trycatch" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP">
+    <codetemplate abbreviation="trycatch" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION">
         <code>
 <![CDATA[try {
 ${selection}${cursor}
@@ -280,7 +280,7 @@
         </code>
     </codetemplate>
         
-    <codetemplate abbreviation="psvm">
+    <codetemplate abbreviation="psvm" contexts="CLASS">
         <code>
 <![CDATA[public static void main(String[] args) {
    ${cursor}
@@ -313,7 +313,7 @@
     <!-- Added in 6.9 -->
 
     <!-- Arrays and List conversion and sorting -->
-    <codetemplate abbreviation="2ar" contexts="BLOCK,CASE,LABELED_STATEMENT">
+    <codetemplate abbreviation="2ar">
          <code>
  <![CDATA[${clazz}[] ${var newVarName default="arr"} = ${typeCast cast 
default="" editable=false} ${coll 
instanceof="java.util.Collection"}.toArray(new ${clazz}[${coll}.size()]);
  ]]>
@@ -332,7 +332,7 @@
      ${cursor}]]></code></codetemplate>
      <codetemplate abbreviation="csort"><code><![CDATA[${collsType 
type="java.util.Collections" default="Collections" 
editable="false"}.sort(${var instanceof="java.util.List"});
          ${cursor}]]></code></codetemplate>
-     <codetemplate abbreviation="form" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"
 descriptionId="CT_form">
+     <codetemplate abbreviation="form" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP,LAMBDA_EXPRESSION"
 descriptionId="CT_form">
          <code>
 <![CDATA[for (${entryType iterableElementType default="Map.Entry<Object, 
Object>" editable=false} ${entry newVarName default="en"} : ${map 
instanceof="java.util.Map" default="m"}.entrySet()) {
     ${KeyType rightSideType default="Object"} ${key newVarName 
default="key"} = ${entry}.getKey();
@@ -468,7 +468,7 @@
         }
      }
      ]]></code></codetemplate>
-    <codetemplate abbreviation="if" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"
 descriptionId="CT_iff">
+    <codetemplate abbreviation="if" descriptionId="CT_iff">
         <code>
 <![CDATA[if (${EXP instanceof="boolean" default="true"}) {
    ${cursor}
@@ -476,7 +476,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="ife" 
contexts="BLOCK,CASE,LABELED_STATEMENT,DO_WHILE_LOOP,ENHANCED_FOR_LOOP,FOR_LOOP,IF,WHILE_LOOP"
 descriptionId="CT_ifelse">
+    <codetemplate abbreviation="ife" descriptionId="CT_ifelse">
         <code>
 <![CDATA[if (${EXP instanceof="boolean" default="true"}) {
    ${cursor}
@@ -485,7 +485,7 @@
 ]]>
         </code>
     </codetemplate>
-    <codetemplate abbreviation="pue" contexts="BLOCK,CASE">
+    <codetemplate abbreviation="pue">
         <code>
 <![CDATA[public enum ${Type} {
    ${cursor}

[hg] main-silver: Code completion modified to show a list of tem...

Dusan Balek 09/18/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close