Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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