debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/LaunchWizard.java
author dadubrow
Thu, 18 Feb 2010 09:07:17 -0600
changeset 983 8b4ee73c530c
parent 969 b0dd389735fb
child 1011 ac82c32cc589
permissions -rw-r--r--
New launch wizard UI tweaks based on demo feedback
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     1
/*
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     3
* All rights reserved.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     4
* This component and the accompanying materials are made available
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     6
* which accompanies this distribution, and is available
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     8
*
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
     9
* Initial Contributors:
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    11
*
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    12
* Contributors:
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    13
*
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    14
* Description: 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    15
*
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    16
*/
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    17
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    18
package com.nokia.cdt.internal.debug.launch.newwizard;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    19
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    20
import java.text.MessageFormat;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    21
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    22
import org.eclipse.core.runtime.CoreException;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    23
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    24
import org.eclipse.jface.dialogs.Dialog;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    25
import org.eclipse.jface.dialogs.IDialogConstants;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    26
import org.eclipse.jface.dialogs.IPageChangedListener;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    27
import org.eclipse.jface.dialogs.PageChangedEvent;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    28
import org.eclipse.jface.layout.GridDataFactory;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    29
import org.eclipse.jface.wizard.IWizardContainer;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    30
import org.eclipse.jface.wizard.Wizard;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    31
import org.eclipse.jface.wizard.WizardDialog;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    32
import org.eclipse.swt.SWT;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    33
import org.eclipse.swt.events.SelectionAdapter;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    34
import org.eclipse.swt.events.SelectionEvent;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    35
import org.eclipse.swt.layout.GridLayout;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    36
import org.eclipse.swt.widgets.Button;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    37
import org.eclipse.swt.widgets.Composite;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    38
import org.eclipse.swt.widgets.Control;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    39
import org.eclipse.swt.widgets.Shell;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    40
983
8b4ee73c530c New launch wizard UI tweaks based on demo feedback
dadubrow
parents: 969
diff changeset
    41
import com.nokia.carbide.cpp.ui.CarbideUIPlugin;
8b4ee73c530c New launch wizard UI tweaks based on demo feedback
dadubrow
parents: 969
diff changeset
    42
import com.nokia.carbide.cpp.ui.ICarbideSharedImages;
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    43
import com.nokia.carbide.remoteconnections.interfaces.IService;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    44
import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    45
import com.nokia.cdt.internal.debug.launch.wizard.ILaunchCreationWizard;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    46
import com.nokia.cdt.internal.debug.launch.wizard.LaunchOptions;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    47
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    48
/**
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    49
 * New launch wizard for Carbide 3.0.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    50
 * 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    51
 * See https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=10419
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    52
 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    53
public class LaunchWizard extends Wizard implements ILaunchCreationWizard {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    54
	 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    55
	private LaunchWizardData launchData;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    56
	private UnifiedLaunchOptionsPage mainPage;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    57
	private Button advancedButton;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    58
	private boolean advancedEdit;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    59
	private IPageChangedListener pageChangedListener;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    60
	private boolean hasFinished;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    61
	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    62
	public LaunchWizard(LaunchOptions launchOptions, IService trkService) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    63
		launchData = new LaunchWizardData(launchOptions, trkService);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    64
		mainPage = new UnifiedLaunchOptionsPage(launchData); 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    65
		mainPage.initializeSettings();
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
    66
		setWindowTitle(Messages.getString("LaunchWizard.Title")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    67
    }
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    68
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    69
	/* (non-Javadoc)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    70
	 * @see org.eclipse.jface.wizard.Wizard#addPages()
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    71
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    72
	@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    73
	public void addPages() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    74
		addPage(mainPage);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    75
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    76
	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    77
	/* (non-Javadoc)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    78
	 * @see org.eclipse.jface.wizard.Wizard#setContainer(org.eclipse.jface.wizard.IWizardContainer)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    79
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    80
	@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    81
	public void setContainer(final IWizardContainer wizardContainer) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    82
		super.setContainer(wizardContainer);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    83
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    84
		// Thanks, JFace, for making it so hard to know when the UI is ready
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    85
		if (wizardContainer instanceof WizardDialog && advancedButton == null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    86
			pageChangedListener = new IPageChangedListener() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    87
				
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    88
				public void pageChanged(PageChangedEvent event) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    89
					addAdvancedButton();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    90
					((WizardDialog)getContainer()).removePageChangedListener(pageChangedListener);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    91
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    92
			};
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    93
			((WizardDialog)wizardContainer).addPageChangedListener(pageChangedListener);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    94
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    95
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    96
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    97
	protected void addAdvancedButton() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    98
		if (advancedButton == null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    99
			Composite parent = (Composite) ((Dialog) getContainer()).buttonBar;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   100
			if (parent != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   101
				
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   102
				advancedButton = new Button(parent, SWT.CHECK);
983
8b4ee73c530c New launch wizard UI tweaks based on demo feedback
dadubrow
parents: 969
diff changeset
   103
				GridDataFactory.swtDefaults().align(SWT.LEFT, SWT.CENTER).indent(6, 0).applyTo(advancedButton);
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   104
				((GridLayout) parent.getLayout()).numColumns++;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   105
				advancedButton.moveBelow(parent.getChildren()[0]);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   106
				
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   107
				advancedButton.setText(Messages.getString("LaunchWizard.AdvancedLabel")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   108
				advancedButton.setToolTipText(MessageFormat.format(
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   109
						Messages.getString("LaunchWizard.AdvancedTip"), //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   110
						launchData.getModeLabel()));
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   111
				advancedButton.addSelectionListener(new SelectionAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   112
					@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   113
					public void widgetSelected(SelectionEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   114
						updateDebugEditButton();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   115
					}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   116
				});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   117
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   118
			
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   119
			// Thanks, JFace, for deleting validation messages on the first display
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   120
			mainPage.validatePage();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   121
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   122
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   123
	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   124
	@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   125
	public boolean canFinish() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   126
		if (advancedEdit)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   127
			return true;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   128
		return super.canFinish();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   129
	}	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   130
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   131
	protected void updateDebugEditButton() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   132
		Button finishButton = findFinishButton();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   133
		if (finishButton != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   134
			advancedEdit = advancedButton.getSelection();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   135
			if (advancedEdit) {
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   136
				finishButton.setText(Messages.getString("LaunchWizard.EditLabel")); //$NON-NLS-1$
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   137
				finishButton.setToolTipText(Messages.getString("LaunchWizard.EditTip")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   138
				getContainer().updateButtons();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   139
			} else {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   140
				finishButton.setText(launchData.getModeLabel());
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   141
				finishButton.setToolTipText(Messages.getString("LaunchWizard.FinishTip")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   142
				getContainer().updateButtons();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   143
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   144
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   145
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   146
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   147
	/**
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   148
	 * Thanks, SWT and JFace, for making this so difficult
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   149
	 * @return the Finish button
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   150
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   151
	private Button findFinishButton() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   152
		if (getContainer() instanceof Dialog) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   153
			return findFinishButton((Composite) ((Dialog) getContainer()).buttonBar);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   154
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   155
		return null;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   156
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   157
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   158
	/**
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   159
	 * @param buttonBar
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   160
	 * @return
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   161
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   162
	private Button findFinishButton(Composite parent) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   163
		for (Control kid : parent.getChildren()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   164
			if (kid instanceof Button) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   165
				if (kid.getData() instanceof Integer && (Integer) kid.getData() == IDialogConstants.FINISH_ID) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   166
					return (Button) kid;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   167
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   168
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   169
			else if (kid instanceof Composite) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   170
				Button button = findFinishButton((Composite) kid);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   171
				if (button != null)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   172
					return button;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   173
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   174
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   175
		return null;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   176
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   177
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   178
	@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   179
	public boolean performFinish() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   180
		hasFinished = true;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   181
		return true;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   182
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   183
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   184
	public boolean shouldOpenLaunchConfigurationDialog() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   185
		return hasFinished && advancedEdit;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   186
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   187
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   188
	public ILaunchConfigurationWorkingCopy getLaunchConfiguration() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   189
		if (!hasFinished)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   190
			return null;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   191
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   192
		ILaunchConfigurationWorkingCopy config = null;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   193
		try {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   194
			config = launchData.createConfiguration();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   195
		} catch (CoreException e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   196
			LaunchPlugin.log(e);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   197
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   198
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   199
		return config;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   200
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   201
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   202
	public void init() {
983
8b4ee73c530c New launch wizard UI tweaks based on demo feedback
dadubrow
parents: 969
diff changeset
   203
		setDefaultPageImageDescriptor(CarbideUIPlugin.getSharedImages().getImageDescriptor(ICarbideSharedImages.IMG_NEW_LAUNCH_CONFIG_WIZARD_BANNER));
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   204
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   205
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   206
	public int openWizard(Shell shell) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   207
		WizardDialog dialog = new WizardDialog(shell, this);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   208
		return dialog.open();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   209
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   210
}