Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoopur Gupta2016-03-21 01:53:41 -0400
committerNoopur Gupta2016-03-21 01:53:41 -0400
commit4c04a97e157b64ddf79f1c2f72296559e5455c8f (patch)
tree5d25a0d7451320d79cfa2d101245028bedb00146 /org.eclipse.text
parent25a4b22643b1a8e30a72350fd9cda69d7095ce1f (diff)
downloadeclipse.platform.text-4c04a97e157b64ddf79f1c2f72296559e5455c8f.tar.gz
eclipse.platform.text-4c04a97e157b64ddf79f1c2f72296559e5455c8f.tar.xz
eclipse.platform.text-4c04a97e157b64ddf79f1c2f72296559e5455c8f.zip
Fixed bug 489715: [templates] Insert template does not add default valueY20160324-1000I20160322-0800
of word_selection and line_selection templates Change-Id: Ib798ad28e296aed6d986b242368215f3776a60a5 Signed-off-by: Noopur Gupta <noopur_gupta@in.ibm.com>
Diffstat (limited to 'org.eclipse.text')
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/GlobalTemplateVariables.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/GlobalTemplateVariables.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/GlobalTemplateVariables.java
index 625bb49f2..11bdaddde 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/GlobalTemplateVariables.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/GlobalTemplateVariables.java
@@ -88,7 +88,7 @@ public class GlobalTemplateVariables {
private void resolveWithParams(TemplateVariable variable, TemplateContext context, List<String> params) {
String selection= context.getVariable(SELECTION);
- if (selection != null) {
+ if (selection != null && !selection.isEmpty()) {
variable.setValue(selection);
} else {
String defaultValue= params.get(0);

Back to the top