1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 17:35:35 +02:00

Bug 464636 - Example of adding a tab to the Run launch

Change-Id: I6d557ca787b3bf400e6bfbb3f9a6b219ecb003f9
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2015-04-22 10:37:27 -04:00
parent 479cd95c3a
commit 7d3c3bcfe8
2 changed files with 69 additions and 6 deletions

View file

@ -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

View file

@ -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) {
}
}