Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2002-11-07 04:32:59 +0000
committerDarin Wright2002-11-07 04:32:59 +0000
commitbe1ba6db489b90f0fb6f5e128b2e6f76b297c46c (patch)
tree0f474183f61b8b30fc449811b3ab92ea2517da19 /org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
parent3f50f9b35bee5639e70a2b054aadbd766139020d (diff)
downloadeclipse.platform.debug-be1ba6db489b90f0fb6f5e128b2e6f76b297c46c.tar.gz
eclipse.platform.debug-be1ba6db489b90f0fb6f5e128b2e6f76b297c46c.tar.xz
eclipse.platform.debug-be1ba6db489b90f0fb6f5e128b2e6f76b297c46c.zip
ant launch shortcut
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java32
1 files changed, 28 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
index 307a2fc93..4cde4abe8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
@@ -1,13 +1,19 @@
package org.eclipse.debug.ui;
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
+/**********************************************************************
+Copyright (c) 2002 IBM Corp. and others.
+All rights reserved.   This program and the accompanying materials
+are made available under the terms of the Common Public License v0.5
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v05.html
+Contributors:
+**********************************************************************/
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.internal.ui.SWTUtil;
import org.eclipse.swt.SWT;
@@ -221,5 +227,23 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura
return null;
}
+ /**
+ * Convenience method to set a boolean attribute of on a launch
+ * configuration. If the value being set is the default, the attribute's
+ * value is set to <code>null</code>.
+ *
+ * @param attribute
+ * @param configuration
+ * @param value
+ * @param defaultValue
+ * @since 2.1
+ */
+ protected void setAttribute(String attribute, ILaunchConfigurationWorkingCopy configuration, boolean value, boolean defaultValue) {
+ if (value == defaultValue) {
+ configuration.setAttribute(attribute, (String)null);
+ } else {
+ configuration.setAttribute(attribute, value);
+ }
+ }
}

Back to the top