diff options
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r-- | org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java index e8c1292b2..f8ecf711c 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java @@ -753,16 +753,17 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen if (template != null && template.isWorkingCopy()) { throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), DebugCoreMessages.LaunchConfigurationWorkingCopy_6)); } - if (isTemplate()) { - throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), DebugCoreMessages.LaunchConfigurationWorkingCopy_7)); - } if (template == null) { removeAttribute(ATTR_TEMPLATE); } else { + if (isTemplate()) { + throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), DebugCoreMessages.LaunchConfigurationWorkingCopy_7)); + } if (copy) { copyAttributes(template); } setAttribute(ATTR_TEMPLATE, template.getMemento()); + setTemplate(false); // template attribute was copied, so now remove it } } } |