diff options
author | Darin Wright | 2009-11-04 21:34:05 +0000 |
---|---|---|
committer | Darin Wright | 2009-11-04 21:34:05 +0000 |
commit | e0a7da4168dfc7b4ed81131be436e12993ff617e (patch) | |
tree | 7d0b6e480e1fd3cdc25835013f817c92ee1adb85 | |
parent | 537a9b593757a8012df704ed968f9c48243496a2 (diff) | |
download | eclipse.platform.debug-e0a7da4168dfc7b4ed81131be436e12993ff617e.tar.gz eclipse.platform.debug-e0a7da4168dfc7b4ed81131be436e12993ff617e.tar.xz eclipse.platform.debug-e0a7da4168dfc7b4ed81131be436e12993ff617e.zip |
Bug 41353 - [launching] Launch config templates
-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 } } } |