Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-04-11 14:44:31 +0000
committerMarkus Keller2012-04-11 14:44:31 +0000
commit1645fa21e2b2453126277a6d41baeeb71cc3b5ca (patch)
tree907097f1513febd75ab2a021a54d5440aac2af5e
parent5f139110a11e5198c690cb1325a9d48c06c96352 (diff)
downloadeclipse.platform.common-1645fa21e2b2453126277a6d41baeeb71cc3b5ca.tar.gz
eclipse.platform.common-1645fa21e2b2453126277a6d41baeeb71cc3b5ca.tar.xz
eclipse.platform.common-1645fa21e2b2453126277a6d41baeeb71cc3b5ca.zip
Bug 200847: [templates] Variable resolver resolves to array of specified
type
-rw-r--r--bundles/org.eclipse.jdt.doc.user/concepts/concept-template-variables.htm13
1 files changed, 7 insertions, 6 deletions
diff --git a/bundles/org.eclipse.jdt.doc.user/concepts/concept-template-variables.htm b/bundles/org.eclipse.jdt.doc.user/concepts/concept-template-variables.htm
index 0b4796fbf..15246bda4 100644
--- a/bundles/org.eclipse.jdt.doc.user/concepts/concept-template-variables.htm
+++ b/bundles/org.eclipse.jdt.doc.user/concepts/concept-template-variables.htm
@@ -23,11 +23,12 @@
<ul>
<li><strong>Simple</strong> variables take the following form:
<p><strong><code>${array}</code></strong></p>
- <p>This defines a variable with name 'array' that will resolve to an array. It can be referenced multiple times as is.</p>
+ <p>This defines a variable with name <code>array</code> that will resolve to an array. It can be referenced multiple times as is.</p>
</li>
<li><strong>Full</strong> variables take the following form:
<p><strong><code>${it:var(java.util.Iterator)}</code></strong></p>
- <p>This defines a variable with name 'it' that will resolve to a local variable of type <code>java.util.Iterator</code>. It can be referenced multiple times by simply giving its name without the type: <code>${it}</code>.</p>
+ <p>This defines a variable with name <code>it</code> that will resolve to a local variable of type <code>java.util.Iterator</code>. It can be referenced multiple times by simply giving its name without the type: <code>${it}</code>.
+ <br>Arguments to a full variable can be written verbatim if they are qualified names or integers. If an argument includes other characters or spaces, then it has to be enclosed in single quotes <code>''</code>.</p>
</li>
</ul>
<p>If there are several possible matches for a variable, they may be presented as proposals to the user.</p>
@@ -53,7 +54,7 @@
</tr>
<tr>
<td><strong>${dollar}</strong></td>
- <td>Evaluates to the dollar symbol '$'. Alternatively, two dollars can be used: '$$'.</td>
+ <td>Evaluates to the dollar symbol <code>$</code>. Alternatively, two dollars can be used: <code>$$</code>.</td>
</tr>
<tr>
<td><strong>${enclosing_method}</strong></td>
@@ -134,7 +135,7 @@
<td><strong>${<i>id</i>:var(<i>type[,type]*</i>)}</strong></td>
<td>Evaluates to a field, local variable or parameter visible in the current scope that is a subtype of any of the given types. If no type is specified, any non-primitive variable matches.
<p>Example:<br>
- <code>${array:var(java.lang.Object[])}</code>
+ <code>${container:var(java.util.List, 'java.lang.Object[]')}</code>
</p>
</td>
@@ -143,7 +144,7 @@
<td><strong>${<i>id</i>:localVar(<i>type[,type]*</i>)}</strong></td>
<td>Evaluates to a local variable or parameter visible in the current scope that is a subtype of any of the given type. If no type is specified, any non-primitive local variable matches.
<p>
- <strong>${array}</strong> is a shortcut for <strong>${array:localVar(java.lang.Object[])}</strong>, but also matches arrays of primitive types.<br>
+ <strong>${array}</strong> is a shortcut for <strong>${array:localVar('java.lang.Object[]')}</strong>, but also matches arrays of primitive types.<br>
<strong>${collection}</strong> is a shortcut for <strong>${collection:localVar(java.util.Collection)}</strong>.<br>
<strong>${iterable}</strong> is a shortcut for <strong>${iterable:localVar(java.lang.Iterable)}</strong>, but also matches arrays.
</p>
@@ -211,7 +212,7 @@
<td>
Adds a static import statement for each qualified name that is not already imported.
The <code>qualifiedName</code> is the fully qualified name of a static field or method
- or it is the qualified name of a type plus a '.*' suffix.
+ or it is the qualified name of a type plus a <code>.*</code> suffix, enclosed in single quotes <code>''</code>.
Does nothing if a conflicting import exists.
Evaluates to nothing.
<p>Example:<br>

Back to the top