Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 66576 | Differences between
and this patch

Collapse All | Expand All

(-)LaunchConfigurationPresentationManager.java (-1 / +1 lines)
Lines 190-196 Link Here
190
	public String getDescription(ILaunchConfigurationType configType, String mode) {
190
	public String getDescription(ILaunchConfigurationType configType, String mode) {
191
		LaunchConfigurationPresentationManager manager = LaunchConfigurationPresentationManager.getDefault();
191
		LaunchConfigurationPresentationManager manager = LaunchConfigurationPresentationManager.getDefault();
192
		LaunchConfigurationTabGroupExtension extension = manager.getExtension(configType.getAttribute("id"), mode); //$NON-NLS-1$
192
		LaunchConfigurationTabGroupExtension extension = manager.getExtension(configType.getAttribute("id"), mode); //$NON-NLS-1$
193
		return extension.getDescription(mode);
193
		return (extension != null ? extension.getDescription(mode) : null);
194
	}	
194
	}	
195
	
195
	
196
}
196
}
(-)LaunchConfigurationTabGroupViewer.java (-93 / +92 lines)
Lines 36-41 Link Here
36
import org.eclipse.jface.viewers.Viewer;
36
import org.eclipse.jface.viewers.Viewer;
37
import org.eclipse.swt.SWT;
37
import org.eclipse.swt.SWT;
38
import org.eclipse.swt.custom.BusyIndicator;
38
import org.eclipse.swt.custom.BusyIndicator;
39
import org.eclipse.swt.custom.StackLayout;
39
import org.eclipse.swt.events.ModifyEvent;
40
import org.eclipse.swt.events.ModifyEvent;
40
import org.eclipse.swt.events.ModifyListener;
41
import org.eclipse.swt.events.ModifyListener;
41
import org.eclipse.swt.events.SelectionAdapter;
42
import org.eclipse.swt.events.SelectionAdapter;
Lines 148-153 Link Here
148
	 * launch configuration type or <code>null</code> if none.
149
	 * launch configuration type or <code>null</code> if none.
149
	 */
150
	 */
150
	private String fDescription = null;
151
	private String fDescription = null;
152
	
153
	/**
154
	 * A placeholder for switching between the tabs for a config and the getting started tab
155
	 * @since 3.2
156
	 */
157
	private Composite fTabPlaceHolder = null;
158
	
159
	/**
160
	 * A new composite replacing the perspectives tab
161
	 * @since 3.2
162
	 */
163
	private Composite fGettingStarted = null;
151
164
152
	/**
165
	/**
153
	 * Constructs a viewer in the given composite, contained by the given
166
	 * Constructs a viewer in the given composite, contained by the given
Lines 232-249 Link Here
232
		gd = new GridData();
245
		gd = new GridData();
233
		gd.horizontalSpan = 2;
246
		gd.horizontalSpan = 2;
234
		spacer.setLayoutData(gd);
247
		spacer.setLayoutData(gd);
235
248
		
236
		fTabComposite = new Composite(container, SWT.NONE);
249
		/*
250
		 * fix for bug 66576 and 79709
251
		 */
252
		fTabPlaceHolder = new Composite(container, SWT.NONE);
253
		fTabPlaceHolder.setLayout(new StackLayout());
254
		gd = new GridData(GridData.FILL_BOTH);
255
		gd.horizontalSpan = 2;
256
		fTabPlaceHolder.setLayoutData(gd);
257
		
258
		fGettingStarted = new Composite(fTabPlaceHolder, SWT.NONE);
259
		fGettingStarted.setLayout(new GridLayout());
260
		gd = new GridData(GridData.FILL_BOTH);
261
		fGettingStarted.setLayoutData(gd);
262
		
263
		createGettingStarted(fGettingStarted);
264
		
265
		fTabComposite = new Composite(fTabPlaceHolder, SWT.NONE);
237
		GridLayout outerTabCompositeLayout = new GridLayout();
266
		GridLayout outerTabCompositeLayout = new GridLayout();
238
		outerTabCompositeLayout.marginHeight = 0;
267
		outerTabCompositeLayout.marginHeight = 0;
239
		outerTabCompositeLayout.marginWidth = 0;
268
		outerTabCompositeLayout.marginWidth = 0;
240
		fTabComposite.setLayout(outerTabCompositeLayout);
269
		fTabComposite.setLayout(outerTabCompositeLayout);
241
		gd = new GridData(GridData.FILL_BOTH);
270
		gd = new GridData(GridData.FILL_BOTH);
242
		gd.horizontalSpan = 2;
243
		fTabComposite.setLayoutData(gd);
271
		fTabComposite.setLayoutData(gd);
244
272
245
		createTabFolder(fTabComposite);
273
		createTabFolder(fTabComposite);
246
274
		
247
		Composite buttonComp = new Composite(container, SWT.NONE);
275
		Composite buttonComp = new Composite(container, SWT.NONE);
248
		GridLayout buttonCompLayout = new GridLayout();
276
		GridLayout buttonCompLayout = new GridLayout();
249
		buttonCompLayout.numColumns = 2;
277
		buttonCompLayout.numColumns = 2;
Lines 278-283 Link Here
278
306
279
	}
307
	}
280
	
308
	
309
	/**
310
	 * Simple method to create a spacer in the page
311
	 * 
312
	 * @param composite the composite to add the spacer to
313
	 * @param columnSpan the amount of space for the spacer
314
	 * @since 3.2
315
	 */
316
	protected void createSpacer(Composite composite, int columnSpan) {
317
		Label label = new Label(composite, SWT.NONE);
318
		GridData gd = new GridData();
319
		gd.horizontalSpan = columnSpan;
320
		label.setLayoutData(gd);
321
	}// end createSpacer
322
	
323
	/**
324
	 * Creates some help text for the tab group launch types
325
	 * @param parent thep arent composite
326
	 * @since 3.2
327
	 */
328
	private void createGettingStarted(Composite parent) {
329
		Font font = parent.getFont();
330
		GridData gd = null;
331
		createSpacer(parent, 1);
332
		Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
333
		label.setFont(font);
334
		label.setText(MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_2, null));
335
		gd = new GridData(GridData.FILL_HORIZONTAL);
336
		gd.widthHint = parent.getBounds().width - 30;
337
		label.setLayoutData(gd);
338
		createSpacer(parent, 1);
339
		label = new Label(parent, SWT.LEFT | SWT.WRAP);
340
		label.setFont(font);
341
		label.setText(MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_1, null));
342
		gd = new GridData(GridData.FILL_HORIZONTAL);
343
		gd.widthHint = parent.getBounds().width - 30;
344
		label.setLayoutData(gd);
345
	}
346
	
347
	/**
348
	 * Creates the tab folder for displaying config instances
349
	 * @param parent
350
	 */
281
	private void createTabFolder(Composite parent) {
351
	private void createTabFolder(Composite parent) {
282
		Point size = null;
352
		Point size = null;
283
		if (fTabFolder != null) {
353
		if (fTabFolder != null) {
Lines 465-482 Link Here
465
			public void run() {
535
			public void run() {
466
				try {
536
				try {
467
					if (fInput instanceof ILaunchConfiguration) {
537
					if (fInput instanceof ILaunchConfiguration) {
538
						/*
539
						 * fix for bug 66576 and 79709
540
						 */
541
						((StackLayout)fTabPlaceHolder.getLayout()).topControl = fTabComposite;
542
						fTabPlaceHolder.layout(true);
468
						ILaunchConfiguration configuration = (ILaunchConfiguration)fInput;
543
						ILaunchConfiguration configuration = (ILaunchConfiguration)fInput;
469
						setOriginal(configuration);
544
						setOriginal(configuration);
470
						setWorkingCopy(configuration.getWorkingCopy());
545
						setWorkingCopy(configuration.getWorkingCopy());
471
						displayInstanceTabs();
546
						displayInstanceTabs();
472
					} else if (fInput instanceof ILaunchConfigurationType) {
547
					} else if (fInput instanceof ILaunchConfigurationType) {
473
						ILaunchConfiguration configuration = LaunchConfigurationManager.getSharedTypeConfig((ILaunchConfigurationType)fInput);
548
						/*
474
						setOriginal(configuration);
549
						 * fix for bug 66576 and 79709
475
						setWorkingCopy(configuration.getWorkingCopy());
550
						 */
476
						displaySharedTabs();
551
						fDescription = getDescription((ILaunchConfigurationType)fInput);
552
						setNoInput();
553
						refreshStatus();
477
					} else {
554
					} else {
478
						setNoInput();
555
						setNoInput();
479
					}
556
					}//end else
480
					setRedraw(true);
557
					setRedraw(true);
481
				} catch (CoreException ce) {
558
				} catch (CoreException ce) {
482
					errorDialog(ce);
559
					errorDialog(ce);
Lines 491-497 Link Here
491
	private void setNoInput() {
568
	private void setNoInput() {
492
		setOriginal(null);
569
		setOriginal(null);
493
		setWorkingCopy(null);
570
		setWorkingCopy(null);
494
		getVisibleArea().setVisible(false);
571
		fNameLabel.setVisible(false);
572
		fNameWidget.setVisible(false);
573
		((StackLayout)fTabPlaceHolder.getLayout()).topControl = fGettingStarted;
574
		fTabPlaceHolder.layout(true);
495
		disposeExistingTabs();				
575
		disposeExistingTabs();				
496
	}
576
	}
497
	
577
	
Lines 558-622 Link Here
558
	}
638
	}
559
	
639
	
560
	/**
640
	/**
561
	 * Displays tabs for the current config type
562
	 */
563
	protected void displaySharedTabs() {
564
		// Turn on initializing flag to ignore message updates
565
		setInitializingTabs(true);
566
567
		ILaunchConfigurationType type = null;
568
		try {
569
			type = getWorkingCopy().getType();
570
			showSharedTabsFor(type);
571
		} catch (CoreException e) {
572
			errorDialog(e);
573
			setInitializingTabs(false);
574
			return;
575
		}
576
		// hide the name area
577
		fNameLabel.setVisible(false);
578
		fNameWidget.setVisible(false);
579
		// Update the name field before to avoid verify error
580
		getNameWidget().setText(getWorkingCopy().getName());
581
582
		// Retrieve the current tab group.  If there is none, clean up and leave
583
		ILaunchConfigurationTabGroup tabGroup = getTabGroup();
584
		if (tabGroup == null) {
585
			IStatus status = new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_No_tabs_defined_for_launch_configuration_type__0__1, new String[]{type.getName()}), null); 
586
			CoreException e = new CoreException(status);
587
			errorDialog(e);
588
			setInitializingTabs(false);
589
			return;
590
		}
591
592
		// Update the tabs with the new working copy
593
		tabGroup.initializeFrom(getWorkingCopy());
594
595
		// Update the name field after in case client changed it
596
		getNameWidget().setText(getWorkingCopy().getName());
597
		
598
		fCurrentTabIndex = getTabFolder().getSelectionIndex();
599
600
		// Turn off initializing flag to update message
601
		setInitializingTabs(false);
602
		
603
		if (!getVisibleArea().isVisible()) {
604
			getVisibleArea().setVisible(true);
605
		}
606
		
607
		fDescription = getDescription(null);
608
		
609
		refreshStatus();		
610
	}	
611
	
612
	/**
613
	 * Populate the tabs in the configuration edit area to be appropriate to the current
641
	 * Populate the tabs in the configuration edit area to be appropriate to the current
614
	 * launch configuration type.
642
	 * launch configuration type.
615
	 */
643
	 */
616
	private void showInstanceTabsFor(ILaunchConfigurationType configType) {
644
	private void showInstanceTabsFor(ILaunchConfigurationType configType) {
617
645
618
		// Don't do any work if the current tabs are for the current config type
646
		// Don't do any work if the current tabs are for the current config type
619
		if (getTabType() != null && getTabType().equals(configType) && !(getTabGroup() instanceof SharedLaunchTabGroup)) {
647
		if (getTabType() != null && getTabType().equals(configType)) { 
620
			return;
648
			return;
621
		}
649
		}
622
		
650
		
Lines 671-698 Link Here
671
	}
699
	}
672
	
700
	
673
	/**
701
	/**
674
	 * Populate the tabs in the configuration edit area for the shared info
675
	 * for the given launch config type.
676
	 */
677
	private void showSharedTabsFor(ILaunchConfigurationType configType) {
678
679
		// Don't do any work if the current tabs are for the current config type
680
		if (getTabType() != null && getTabType().equals(configType) && (getTabGroup() instanceof SharedLaunchTabGroup)) {
681
			return;
682
		}		
683
		// Build the new tabs
684
		ILaunchConfigurationTabGroup group = new SharedLaunchTabGroup(configType);
685
		group.createTabs(getLaunchConfigurationDialog(), getLaunchConfigurationDialog().getMode());
686
		ILaunchConfigurationTab[] tabs = group.getTabs();
687
		for (int i = 0; i < tabs.length; i++) {
688
			tabs[i].setLaunchConfigurationDialog(getLaunchConfigurationDialog());
689
		}//end for
690
		showTabsFor(group);
691
		setTabType(configType);
692
		setTabGroup(group);		
693
	}		
694
695
	/**
696
	 * Create the tabs in the configuration edit area for the given tab group.
702
	 * Create the tabs in the configuration edit area for the given tab group.
697
	 */
703
	 */
698
	private void showTabsFor(ILaunchConfigurationTabGroup tabGroup) {
704
	private void showTabsFor(ILaunchConfigurationTabGroup tabGroup) {
Lines 931-939 Link Here
931
		if(isInitializingTabs()) {
937
		if(isInitializingTabs()) {
932
			return false;
938
			return false;
933
		}
939
		}
934
		if (getActiveTab() instanceof SharedLaunchTab) {
935
			return false;
936
		}
937
		if (getWorkingCopy() == null) {
940
		if (getWorkingCopy() == null) {
938
			return false;
941
			return false;
939
		}
942
		}
Lines 1219-1229 Link Here
1219
	 * Notification that the 'Revert' button has been pressed
1222
	 * Notification that the 'Revert' button has been pressed
1220
	 */
1223
	 */
1221
	protected void handleRevertPressed() {
1224
	protected void handleRevertPressed() {
1222
		if (getActiveTab() instanceof SharedLaunchTab) {
1225
		inputChanged(getOriginal());
1223
			inputChanged(getTabType());	
1224
		} else {
1225
			inputChanged(getOriginal());
1226
		}
1227
	}	
1226
	}	
1228
	
1227
	
1229
	/**
1228
	/**
(-)LaunchConfigurationsDialog.java (-2 / +4 lines)
Lines 1076-1082 Link Here
1076
		}
1076
		}
1077
		String mode = getMode();
1077
		String mode = getMode();
1078
		close();
1078
		close();
1079
		DebugUITools.launch(config, mode);
1079
		if(config != null) {
1080
			DebugUITools.launch(config, mode);
1081
		}//end if
1080
	}
1082
	}
1081
	
1083
	
1082
	/***************************************************************************************
1084
	/***************************************************************************************
Lines 1296-1302 Link Here
1296
		setErrorMessage(getTabViewer().getErrorMesssage());
1298
		setErrorMessage(getTabViewer().getErrorMesssage());
1297
		setMessage(getTabViewer().getMessage());				
1299
		setMessage(getTabViewer().getMessage());				
1298
	}
1300
	}
1299
	
1301
1300
	/**
1302
	/**
1301
	 * Returns the launch configuration selection area control.
1303
	 * Returns the launch configuration selection area control.
1302
	 * 
1304
	 * 
(-)LaunchConfigurationsMessages.java (-6 / +2 lines)
Lines 149-159 Link Here
149
		NLS.initializeMessages(BUNDLE_NAME, LaunchConfigurationsMessages.class);
149
		NLS.initializeMessages(BUNDLE_NAME, LaunchConfigurationsMessages.class);
150
	}
150
	}
151
151
152
	public static String SharedLaunchTab_0;
152
	public static String LaunchConfigurationTabGroupViewer_1;
153
153
154
	public static String SharedLaunchTab_1;
154
	public static String LaunchConfigurationTabGroupViewer_2;
155
156
	public static String SharedLaunchTab_2;
157
158
	public static String SharedLaunchTab_3;
159
}
155
}
(-)LaunchConfigurationsMessages.properties (-4 / +2 lines)
Lines 45-50 Link Here
45
LaunchConfigurationDialog_An_exception_occurred_while_retrieving_launch_configurations_20=An exception occurred while retrieving launch configurations
45
LaunchConfigurationDialog_An_exception_occurred_while_retrieving_launch_configurations_20=An exception occurred while retrieving launch configurations
46
LaunchConfigurationDialog_Cancel_34=Cancel
46
LaunchConfigurationDialog_Cancel_34=Cancel
47
LaunchConfigurationTabGroupViewer_0={0} is an invalid character in launch configuration name {1}
47
LaunchConfigurationTabGroupViewer_0={0} is an invalid character in launch configuration name {1}
48
LaunchConfigurationTabGroupViewer_1=Once you have created a new configuration you can then configure its settings.
49
LaunchConfigurationTabGroupViewer_2=All possible configuration types are shown in the list to the left. To create a new configuration simply select the configuration type you want and click the New button, located directly below the list. You can create as many configurations as you wish for any of the types, with each configuration independent from any others.
48
LaunchConfigurationDialog_Create__manage__and_run_launch_configurations_8=Create, manage, and run configurations
50
LaunchConfigurationDialog_Create__manage__and_run_launch_configurations_8=Create, manage, and run configurations
49
LaunchConfigurationDialog_Dele_te_14=Dele&te
51
LaunchConfigurationDialog_Dele_te_14=Dele&te
50
LaunchConfigurationDialog_Discard_changes__38=Discard changes?
52
LaunchConfigurationDialog_Discard_changes__38=Discard changes?
Lines 137-143 Link Here
137
139
138
DebugModePromptStatusHandler_0=Breakpoints in Workspace
140
DebugModePromptStatusHandler_0=Breakpoints in Workspace
139
DebugModePromptStatusHandler_1=There are breakpoints enabled in the workspace. Would you rather launch in debug mode?
141
DebugModePromptStatusHandler_1=There are breakpoints enabled in the workspace. Would you rather launch in debug mode?
140
SharedLaunchTab_0=This page provides information to help you get started with creating a new configuration of your choice.
141
SharedLaunchTab_1=All possible configuration types are shown in the list to the left. To create a new configuration simply select the configuration type you want and click the new button, located directly below the list.
142
SharedLaunchTab_2=Getting Started
143
SharedLaunchTab_3=Create a new {0} launch configuration.
(-)SharedLaunchTab.java (-122 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.launchConfigurations;
12
13
import java.text.MessageFormat;
14
15
import org.eclipse.debug.core.ILaunchConfiguration;
16
import org.eclipse.debug.core.ILaunchConfigurationType;
17
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
18
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
19
import org.eclipse.swt.SWT;
20
import org.eclipse.swt.graphics.Font;
21
import org.eclipse.swt.layout.GridData;
22
import org.eclipse.swt.layout.GridLayout;
23
import org.eclipse.swt.widgets.Composite;
24
import org.eclipse.swt.widgets.Label;
25
26
/**
27
 * Provides a general tab for launch configuration types, since tpreference setting have been moved to
28
 * to Perspective preference page in the main preferences dialog
29
 *
30
 *	@since 3.2
31
 */
32
public class SharedLaunchTab extends AbstractLaunchConfigurationTab {
33
34
	/**
35
	 * The launch config type selected to display this tab
36
	 */
37
	private ILaunchConfigurationType fType = null;
38
	
39
	/**
40
	 * The default constructor
41
	 */
42
	public SharedLaunchTab(ILaunchConfigurationType type) {
43
		super();
44
		fType = type;
45
	}//end constructor
46
47
	/* (non-Javadoc)
48
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
49
	 */
50
	public void dispose() {
51
		super.dispose();
52
	}//end dispose
53
54
	/* (non-Javadoc)
55
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
56
	 */
57
	public void launchConfigurationAdded(ILaunchConfiguration configuration) {}
58
59
	/* (non-Javadoc)
60
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
61
	 */
62
	public void launchConfigurationChanged(ILaunchConfiguration configuration) {}
63
64
	/* (non-Javadoc)
65
	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
66
	 */
67
	public void launchConfigurationRemoved(ILaunchConfiguration configuration) {}
68
69
	/* (non-Javadoc)
70
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
71
	 */
72
	public void createControl(Composite parent) {
73
		Font font = parent.getFont();
74
		Composite composite = new Composite(parent, SWT.NONE);
75
		composite.setLayout(new GridLayout(1, false));
76
		composite.setFont(font);
77
		GridData gd = null;
78
		createVerticalSpacer(composite, 1);
79
		Label label = new Label(composite, SWT.LEFT | SWT.WRAP);
80
		label.setFont(font);
81
		label.setText(MessageFormat.format(LaunchConfigurationsMessages.SharedLaunchTab_0, null));
82
		gd = new GridData(GridData.FILL_HORIZONTAL);
83
		gd.widthHint = composite.getBounds().width - 30;
84
		label.setLayoutData(gd);
85
		createVerticalSpacer(composite, 1);
86
		label = new Label(composite, SWT.LEFT | SWT.WRAP);
87
		label.setFont(font);
88
		label.setText(MessageFormat.format(LaunchConfigurationsMessages.SharedLaunchTab_1, null));
89
		gd = new GridData(GridData.FILL_HORIZONTAL);
90
		gd.widthHint = composite.getBounds().width - 30;
91
		label.setLayoutData(gd);
92
		composite.layout(true, true);
93
		setControl(composite);
94
	}//end create control
95
96
	/* (non-Javadoc)
97
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
98
	 */
99
	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {}
100
101
	/* (non-Javadoc)
102
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
103
	 */
104
	public void initializeFrom(ILaunchConfiguration configuration) {}
105
106
	/* (non-Javadoc)
107
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
108
	 */
109
	public void performApply(ILaunchConfigurationWorkingCopy configuration) {}
110
111
	/* (non-Javadoc)
112
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
113
	 */
114
	public String getName() {
115
		return LaunchConfigurationsMessages.SharedLaunchTab_2; 
116
	}//end getName
117
118
	public String getMessage() {
119
		return MessageFormat.format(LaunchConfigurationsMessages.SharedLaunchTab_3, new String[] {fType.getName()});
120
	}
121
122
}
(-)SharedLaunchTabGroup.java (-45 lines)
Removed Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2005 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.launchConfigurations;
12
13
import org.eclipse.debug.core.ILaunchConfigurationType;
14
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
15
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
16
import org.eclipse.debug.ui.ILaunchConfigurationTab;
17
18
/**
19
 * A tab group for the general shared tab for all launch configurations
20
 *
21
 *	@since 3.2
22
 */
23
public class SharedLaunchTabGroup extends AbstractLaunchConfigurationTabGroup {
24
25
	/**
26
	 * The LaunchConfigType that was selected to show this tab
27
	 */
28
	private ILaunchConfigurationType fType;
29
	
30
	/**
31
	 * Default constructor
32
	 */
33
	public SharedLaunchTabGroup(ILaunchConfigurationType type) {
34
		fType = type;
35
	}//end constructor
36
37
	/* (non-Javadoc)
38
	 * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
39
	 */
40
	public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
41
		ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {new SharedLaunchTab(fType)}; 
42
		setTabs(tabs);
43
	}//end createTabs
44
45
}//end class

Return to bug 66576