From 1bdeaffebacacd2b0c0bf8fdd0346694699c84b5 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 13 Sep 2013 11:00:23 -0400 Subject: Bug 417199 - Fix project-less debug Change-Id: Icf2c185dbc53eccd068e384431d16d82a38d789e Signed-off-by: Marc Khouzam Reviewed-on: https://git.eclipse.org/r/16414 Reviewed-by: Sergey Prigogin --- .../cdt/debug/internal/core/DebugStringVariableSubstitutor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debug') diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugStringVariableSubstitutor.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugStringVariableSubstitutor.java index 269df80fa0b..86c1c70bcc9 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugStringVariableSubstitutor.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugStringVariableSubstitutor.java @@ -95,11 +95,11 @@ public class DebugStringVariableSubstitutor implements IStringVariableManager { * variables in the context of the given project. * * @param projectName the name of the project used to resolve project_name, project_loc and - * project_path variables. If {@code null}, the project is determined based on the current + * project_path variables. If {@code null} or empty, the project is determined based on the current * selection. */ public DebugStringVariableSubstitutor(String projectName) { - this(projectName == null ? null : ResourcesPlugin.getWorkspace().getRoot().getProject(projectName)); + this(projectName == null || projectName.isEmpty() ? null : ResourcesPlugin.getWorkspace().getRoot().getProject(projectName)); } public IStringVariable[] getVariables() { -- cgit v1.2.3