Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2015-04-22 14:37:27 +0000
committerMarc Khouzam2015-04-22 14:40:04 +0000
commit7d3c3bcfe84b93d6b7cad38605fb072e17208198 (patch)
tree5d88e5dabbc5248edcf2ca0dbc2306fb8d9e325d /dsf-gdb
parent479cd95c3aef6fcb8e3df3237675a8b7c8f77600 (diff)
downloadorg.eclipse.cdt-7d3c3bcfe84b93d6b7cad38605fb072e17208198.tar.gz
org.eclipse.cdt-7d3c3bcfe84b93d6b7cad38605fb072e17208198.tar.xz
org.eclipse.cdt-7d3c3bcfe84b93d6b7cad38605fb072e17208198.zip
Bug 464636 - Example of adding a tab to the Run launch
Change-Id: I6d557ca787b3bf400e6bfbb3f9a6b219ecb003f9 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'dsf-gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/plugin.xml22
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/ExtendedTab.java53
2 files changed, 69 insertions, 6 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/plugin.xml b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/plugin.xml
index 39b9ff4c997..a6530ebf506 100644
--- a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/plugin.xml
+++ b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/plugin.xml
@@ -19,13 +19,13 @@
<tab
id="org.eclipse.cdt.examples.dsf.gdb.launch.localApplicationLaunch.mainTab"
group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
- name="%launchTab.main.name"
+ name="Main"
class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab">
<associatedDelegate delegate="org.eclipse.cdt.examples.dsf.gdb.launchDelegate"/>
</tab>
<tab id="org.eclipse.cdt.examples.dsf.gdb.launch.localApplicationLaunch.argumentsTab"
group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
- name="%launchTab.arguments.name"
+ name="Arguments"
class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CArgumentsTab">
<associatedDelegate delegate="org.eclipse.cdt.examples.dsf.gdb.launchDelegate"/>
<placement after="org.eclipse.cdt.dsf.gdb.launch.mainTab"/>
@@ -33,7 +33,7 @@
<tab
id="org.eclipse.cdt.examples.dsf.gdb.launch.localApplicationLaunch.environmentTab"
group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
- name="%launchTab.environment.name"
+ name="Environment"
class="org.eclipse.debug.ui.EnvironmentTab">
<associatedDelegate delegate="org.eclipse.cdt.examples.dsf.gdb.launchDelegate"/>
<placement after="org.eclipse.cdt.dsf.gdb.launch.argumentsTab"/>
@@ -41,7 +41,7 @@
<tab
id="org.eclipse.cdt.examples.dsf.gdb.launch.localApplicationLaunch.debuggerTab"
group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
- name="%launchTab.debugger.name"
+ name="Debugger"
class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab">
<associatedDelegate delegate="org.eclipse.cdt.examples.dsf.gdb.launchDelegate"/>
<placement after="org.eclipse.debug.ui.environmentTab"/>
@@ -49,7 +49,7 @@
<tab
id="org.eclipse.cdt.examples.dsf.gdb.launch.localApplicationLaunch.sourceLookupTab"
group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
- name="%launchTab.sourceLookup.name"
+ name="Source"
class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
<associatedDelegate delegate="org.eclipse.cdt.examples.dsf.gdb.launchDelegate"/>
<placement after="org.eclipse.cdt.dsf.gdb.launch.debuggerTab"/>
@@ -57,11 +57,21 @@
<tab
id="org.eclipse.cdt.examples.dsf.gdb.launch.localApplicationLaunch.commonTab"
group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
- name="%launchTab.common.name"
+ name="Common"
class="org.eclipse.debug.ui.CommonTab">
<associatedDelegate delegate="org.eclipse.cdt.examples.dsf.gdb.launchDelegate"/>
<placement after="org.eclipse.debug.ui.sourceLookupTab"/>
</tab>
+ <!-- Tabs added to Run launch -->
+ <tab
+ id="org.eclipse.cdt.examples.dsf.gdb.launch.localApplicationLaunch.extraTab"
+ group="org.eclipse.cdt.launch.applicationRunLaunchTabGroup"
+ name="Extra"
+ class="org.eclipse.cdt.examples.dsf.gdb.ui.ExtendedTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
+ <!-- Place after main tab to check its id -->
+ <placement after="org.eclipse.cdt.cdi.launch.mainTab"/>
+ </tab>
</extension>
<extension point="org.eclipse.core.runtime.adapters">
<factory
diff --git a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/ExtendedTab.java b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/ExtendedTab.java
new file mode 100644
index 00000000000..028dd9dbb5b
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/ui/ExtendedTab.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson 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:
+ * Marc Khouzam (Ericsson) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.examples.dsf.gdb.ui;
+
+import org.eclipse.cdt.launch.ui.CLaunchConfigurationTab;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
+public class ExtendedTab extends CLaunchConfigurationTab {
+
+ @Override
+ public String getName() {
+ return "Extra"; //$NON-NLS-1$
+ }
+
+ @Override
+ public String getId() {
+ return "org.eclipse.cdt.examples.dsf.gdb.extra"; //$NON-NLS-1$
+ }
+
+ @Override
+ public Image getImage() {
+ return DebugUITools.getImage(IInternalDebugUIConstants.IMG_OBJS_COMMON_TAB);
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ }
+
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ }
+
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ }
+}

Back to the top