KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > launchConfigurations > LaunchConfigurationDialog


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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
14 import org.eclipse.debug.core.ILaunchConfiguration;
15 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
16 import org.eclipse.debug.ui.IDebugUIConstants;
17 import org.eclipse.swt.widgets.Composite;
18 import org.eclipse.swt.widgets.Shell;
19
20 /**
21  * A dialog used to edit & launch a single launch configuration.
22  */

23 public class LaunchConfigurationDialog extends LaunchConfigurationPropertiesDialog {
24
25     /**
26      * Constructs a dialog
27      *
28      * @param shell
29      * @param launchConfiguration
30      * @param group
31      */

32     public LaunchConfigurationDialog(Shell shell, ILaunchConfiguration launchConfiguration, LaunchGroupExtension group) {
33         super(shell, launchConfiguration, group);
34     }
35     
36     /* (non-Javadoc)
37      * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
38      */

39     protected void createButtonsForButtonBar(Composite parent) {
40         createButton(parent, ID_LAUNCH_BUTTON, getLaunchButtonText(), true);
41         createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false);
42     }
43     
44     /* (non-Javadoc)
45      * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getShellTitle()
46      */

47     protected String JavaDoc getShellTitle() {
48         return getLaunchConfiguration().getName();
49     }
50     
51     /* (non-Javadoc)
52      * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getTitleAreaTitle()
53      */

54     protected String JavaDoc getTitleAreaTitle() {
55         return LaunchConfigurationsMessages.LaunchConfigurationDialog_Modify_attributes_and_launch__1;
56     }
57     
58     /* (non-Javadoc)
59      * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#getHelpContextId()
60      */

61     protected String JavaDoc getHelpContextId() {
62         return IDebugHelpContextIds.SINGLE_LAUNCH_CONFIGURATION_DIALOG;
63     }
64     
65     /* (non-Javadoc)
66      * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#updateButtons()
67      */

68     public void updateButtons() {
69         // Launch button
70
getTabViewer().refresh();
71         getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch() & getTabViewer().canLaunchWithModes() & !getTabViewer().hasDuplicateDelegates());
72         
73     }
74         
75     /* (non-Javadoc)
76      * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getDialogSettingsSectionName()
77      */

78     protected String JavaDoc getDialogSettingsSectionName() {
79         return IDebugUIConstants.PLUGIN_ID + ".SINGLE_LAUNCH_CONFIGURATION_DIALOG_SECTION"; //$NON-NLS-1$
80
}
81 }
82
Popular Tags