Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/internal/ui/GDBJtagDSFCMainTab.java')
-rw-r--r--jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/internal/ui/GDBJtagDSFCMainTab.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/internal/ui/GDBJtagDSFCMainTab.java b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/internal/ui/GDBJtagDSFCMainTab.java
new file mode 100644
index 00000000000..1a54d185b4f
--- /dev/null
+++ b/jtag/org.eclipse.cdt.debug.gdbjtag.ui/src/org/eclipse/cdt/debug/gdbjtag/internal/ui/GDBJtagDSFCMainTab.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007 - 2010 QNX Software Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * QNX Software Systems - Initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.gdbjtag.internal.ui;
+
+import java.util.HashSet;
+
+import org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchDelegate;
+
+/**
+ * @since 7.0
+ */
+public class GDBJtagDSFCMainTab extends CMainTab {
+
+ public GDBJtagDSFCMainTab() {
+ super(CMainTab.DONT_CHECK_PROGRAM | CMainTab.INCLUDE_BUILD_SETTINGS);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+ super.setDefaults(config);
+ HashSet<String> set = new HashSet<String>();
+ set.add(getLaunchConfigurationDialog().getMode());
+ try {
+ ILaunchDelegate preferredDelegate = config.getPreferredDelegate(set);
+ if (preferredDelegate == null) {
+ config.setPreferredLaunchDelegate(set, "org.eclipse.cdt.debug.gdbjtag.core.dsfLaunchDelegate"); //$NON-NLS-1$
+ }
+ } catch (CoreException e) {}
+ }
+
+}

Back to the top