debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessDialog.java
author Ed Swartz <ed.swartz@nokia.com>
Fri, 23 Apr 2010 15:24:20 -0500
changeset 1284 7ef1318ac801
parent 1185 02373fb1e121
child 1285 84caa86f9460
permissions -rw-r--r--
PNP launch wizard changes: make Remote Program text entry into combo viewer with history
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.io.File;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    21
import java.text.MessageFormat;
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
    22
import java.util.Iterator;
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
    23
import java.util.LinkedHashSet;
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    24
import java.util.List;
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
    25
import java.util.Set;
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    26
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    27
import org.eclipse.cdt.core.model.CoreModel;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    28
import org.eclipse.cdt.core.settings.model.CProjectDescriptionEvent;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    29
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionListener;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    30
import org.eclipse.core.resources.IProject;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    31
import org.eclipse.core.runtime.IPath;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    32
import org.eclipse.core.runtime.IStatus;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    33
import org.eclipse.core.runtime.Path;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    34
import org.eclipse.core.runtime.Status;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    35
import org.eclipse.jface.layout.GridDataFactory;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    36
import org.eclipse.jface.layout.GridLayoutFactory;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    37
import org.eclipse.jface.resource.JFaceResources;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    38
import org.eclipse.jface.viewers.ArrayContentProvider;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    39
import org.eclipse.jface.viewers.ComboViewer;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    40
import org.eclipse.jface.viewers.ISelectionChangedListener;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    41
import org.eclipse.jface.viewers.IStructuredSelection;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    42
import org.eclipse.jface.viewers.LabelProvider;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    43
import org.eclipse.jface.viewers.SelectionChangedEvent;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    44
import org.eclipse.jface.viewers.StructuredSelection;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    45
import org.eclipse.swt.SWT;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    46
import org.eclipse.swt.events.ControlAdapter;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    47
import org.eclipse.swt.events.ControlEvent;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    48
import org.eclipse.swt.events.DisposeEvent;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    49
import org.eclipse.swt.events.DisposeListener;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    50
import org.eclipse.swt.events.ModifyEvent;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    51
import org.eclipse.swt.events.ModifyListener;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    52
import org.eclipse.swt.events.SelectionAdapter;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    53
import org.eclipse.swt.events.SelectionEvent;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    54
import org.eclipse.swt.layout.GridData;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    55
import org.eclipse.swt.widgets.Button;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    56
import org.eclipse.swt.widgets.Combo;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    57
import org.eclipse.swt.widgets.Composite;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    58
import org.eclipse.swt.widgets.Control;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    59
import org.eclipse.swt.widgets.FileDialog;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    60
import org.eclipse.swt.widgets.Label;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    61
import org.eclipse.swt.widgets.Link;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    62
import org.eclipse.swt.widgets.Shell;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    63
import org.eclipse.swt.widgets.Text;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    64
import org.eclipse.ui.dialogs.PreferencesUtil;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    65
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    66
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    67
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    68
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    69
import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
    70
import com.nokia.cdt.internal.debug.launch.LaunchPlugin;
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    71
import com.nokia.cdt.internal.debug.launch.newwizard.LaunchWizardData.EExeSelection;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    72
import com.nokia.cpp.internal.api.utils.core.PathUtils;
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
    73
import com.nokia.cpp.internal.api.utils.core.TextUtils;
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    74
import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils;
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
 *	This dialog allows in-depth configuration of the debug/run process options.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    78
 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    79
public class DebugRunProcessDialog extends AbstractLaunchSettingsDialog implements ICProjectDescriptionListener {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    80
	private ComboViewer projectExecutableViewer;
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
    81
	private ComboViewer remoteProgramViewer;
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    82
	private Button projectExecutableRadioButton;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    83
	private Button remoteExecutableRadioButton;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    84
	private Button attachToProcessRadioButton;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    85
	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    86
	private Label packageInfoLabel;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    87
	private Button installPackageCheckbox;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    88
	private Combo sisFile;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    89
	private Text sisEdit;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    90
	private Button sisBrowse;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    91
	private Composite installPackageUI;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    92
	
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
    93
	private Set<IPath> remotePathEntries = new LinkedHashSet<IPath>();
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
    94
	
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    95
	protected DebugRunProcessDialog(Shell shell, LaunchWizardData data) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    96
		super(shell, data);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    97
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    98
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
    99
	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   100
	/* (non-Javadoc)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   101
	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   102
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   103
	@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   104
	protected Control createDialogArea(Composite parent) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   105
		Composite composite = initDialogArea(parent, 
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   106
				MessageFormat.format(Messages.getString("DebugRunProcessDialog.ChangeProcessMsg"), data.getModeLabel()), //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   107
				data.isDebug() ? LaunchWizardHelpIds.WIZARD_DIALOG_CHANGE_DEBUG_PROCESS : 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   108
					LaunchWizardHelpIds.WIZARD_DIALOG_CHANGE_RUN_PROCESS);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   109
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   110
		loadRemoteProgramEntries();
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   111
		
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   112
		composite.addDisposeListener(new DisposeListener() {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   113
			
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   114
			public void widgetDisposed(DisposeEvent e) {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   115
				saveRemoteProgramEntries();
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   116
			}
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   117
		});
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   118
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   119
		createProcessSelector(composite);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   120
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   121
		Label sep = new Label(composite, SWT.NONE);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   122
		GridDataFactory.fillDefaults().applyTo(sep);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   123
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   124
		createPackageConfiguration(composite);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   125
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   126
		initUI();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   127
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   128
		validate();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   129
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   130
		return composite;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   131
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   132
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   133
	// pref key for paths the user has manually entered
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   134
	final static String USER_REMOTE_PATHS = "user.remote.paths"; //$NON-NLS-1$
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   135
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   136
	/**
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   137
	 * 
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   138
	 */
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   139
	protected void saveRemoteProgramEntries() {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   140
		Set<IPath> uniqueRemotePathEntries = new LinkedHashSet<IPath>(remotePathEntries);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   141
		
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   142
		// in case user was typing, ensure that entry is present
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   143
		if(remoteProgramViewer != null)
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   144
			uniqueRemotePathEntries.add(PathUtils.createPath(remoteProgramViewer.getCombo().getText().trim()));
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   145
		
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   146
		for (Iterator<IPath> iter = uniqueRemotePathEntries.iterator(); iter.hasNext(); ) { 
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   147
			IPath path = iter.next();
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   148
			if (path.isEmpty() || data.getExes().contains(path))
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   149
				iter.remove();
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   150
		}
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   151
		
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   152
		// truncate size
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   153
		while (uniqueRemotePathEntries.size() > 10)
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   154
			uniqueRemotePathEntries.remove(uniqueRemotePathEntries.iterator().next());
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   155
		
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   156
		String pathSoup = TextUtils.catenateStrings(uniqueRemotePathEntries.toArray(), "|"); //$NON-NLS-1$
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   157
		LaunchPlugin.getDefault().getPreferenceStore().setValue(USER_REMOTE_PATHS, pathSoup);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   158
	}
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   159
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   160
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   161
	/**
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   162
	 * 
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   163
	 */
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   164
	protected void loadRemoteProgramEntries() {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   165
		String pathSoup = LaunchPlugin.getDefault().getPreferenceStore().getString(USER_REMOTE_PATHS);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   166
		if (pathSoup != null) {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   167
			String[] paths = pathSoup.split("\\|"); //$NON-NLS-1$
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   168
			for (String path : paths)
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   169
				remotePathEntries.add(PathUtils.createPath(path));
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   170
		}
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   171
	}
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   172
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   173
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   174
	private void createProcessSelector(Composite composite) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   175
		Label label;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   176
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   177
		label = new Label(composite, SWT.WRAP);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   178
		label.setText(MessageFormat.format(Messages.getString("DebugRunProcessDialog.ModeLabel"), data.getModeLabel())); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   179
		label.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   180
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   181
		GridDataFactory.fillDefaults().grab(true, false).applyTo(composite);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   182
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   183
		Composite radioGroup = new Composite(composite, SWT.NONE);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   184
		GridDataFactory.fillDefaults().grab(true, false).applyTo(radioGroup);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   185
		GridLayoutFactory.fillDefaults().extendedMargins(INDENT, 0, 0, 0).numColumns(2).applyTo(radioGroup);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   186
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   187
		createProjectExecutableRadioButton(radioGroup);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   188
		createRemoteExecutableRadioButton(radioGroup);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   189
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   190
		label = new Label(radioGroup, SWT.SEPARATOR | SWT.HORIZONTAL);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   191
		GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(label);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   192
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   193
		createAttachToProcessRadioButton(radioGroup);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   194
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   195
		String msg;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   196
		if (data.isDebug())
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   197
			msg = Messages.getString("DebugRunProcessDialog.DebugConfigureMsg"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   198
		else
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   199
			msg = Messages.getString("DebugRunProcessDialog.RunConfigureMsg"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   200
		setMessage(msg);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   201
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   202
		switch (data.getExeSelection()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   203
		case USE_PROJECT_EXECUTABLE:
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   204
			projectExecutableRadioButton.setSelection(true);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   205
			break;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   206
		case USE_REMOTE_EXECUTABLE:
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   207
			remoteExecutableRadioButton.setSelection(true);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   208
			break;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   209
		case ATTACH_TO_PROCESS:
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   210
			attachToProcessRadioButton.setSelection(true);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   211
			break;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   212
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   213
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   214
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   215
	private void createPackageConfiguration(Composite composite) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   216
		Label label;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   217
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   218
		label = new Label(composite, SWT.WRAP);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   219
		label.setText(MessageFormat.format(Messages.getString("DebugRunProcessDialog.DeployLabel"), data.getModeLabel())); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   220
		label.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   221
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   222
		GridDataFactory.fillDefaults().grab(true, true).applyTo(composite);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   223
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   224
		packageInfoLabel = new Label(composite, SWT.WRAP);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   225
		GridDataFactory.fillDefaults().grab(true, false).applyTo(packageInfoLabel);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   226
		composite.addControlListener(new ControlAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   227
			@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   228
			public void controlResized(ControlEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   229
				packageInfoLabel.pack();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   230
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   231
		});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   232
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   233
		installPackageCheckbox = new Button(composite, SWT.CHECK);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   234
		GridDataFactory.fillDefaults().applyTo(installPackageCheckbox);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   235
		
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   236
		installPackageCheckbox.setText(Messages.getString("DebugRunProcessDialog.InstallBeforeLaunchLabel")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   237
		installPackageUI = new Composite(composite, SWT.NONE);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   238
		GridDataFactory.fillDefaults().indent(INDENT, 0).applyTo(installPackageUI);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   239
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   240
		createSISContents(installPackageUI);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   241
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   242
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   243
		installPackageCheckbox.addSelectionListener(new SelectionAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   244
			@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   245
			public void widgetSelected(SelectionEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   246
				data.setInstallPackage(installPackageCheckbox.getSelection());
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   247
				updatePackageUI();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   248
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   249
		});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   250
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   251
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   252
		if (data.isInstallPackage()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   253
			installPackageCheckbox.setSelection(true);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   254
			updatePackageUI();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   255
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   256
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   257
		updateSisFile();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   258
		updatePackageUI();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   259
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   260
	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   261
    protected void createSISContents(Composite composite) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   262
        GridLayoutFactory.fillDefaults().margins(6, 6).numColumns(2).applyTo(composite);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   263
            
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   264
		final IProject project = data.getProject();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   265
		ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   266
		if (cpi != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   267
			final Label sisLabel = new Label(composite, SWT.NONE);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   268
			sisLabel.setText(Messages.getString("DebugRunProcessDialog.SISFileLabel")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   269
			GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).span(1, 1).applyTo(sisLabel);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   270
			sisLabel.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip")); //$NON-NLS-1$
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   271
			sisLabel.setData(UID, "DebugRunProcessDialog.sisLabel"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   272
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   273
			sisFile = new Combo(composite, SWT.READ_ONLY);
1045
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   274
			GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(sisFile);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   275
			sisFile.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip"));  //$NON-NLS-1$
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   276
			sisFile.setData(UID, "DebugRunProcessDialog.sisFile"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   277
			
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   278
			sisFile.addSelectionListener(new SelectionAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   279
				@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   280
				public void widgetSelected(SelectionEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   281
					updateSisFile();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   282
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   283
			});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   284
			
1045
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   285
			updateSisFileCombo(cpi);
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   286
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   287
			// listen for events so we can detect if they click on the link below and add new sis info.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   288
			CoreModel.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   289
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   290
			composite.addDisposeListener(new DisposeListener() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   291
				
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   292
				public void widgetDisposed(DisposeEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   293
					CoreModel.getDefault().getProjectDescriptionManager().removeCProjectDescriptionListener(DebugRunProcessDialog.this);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   294
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   295
			});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   296
			
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   297
			Link link = new Link(composite, SWT.NONE);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   298
			link.setText("<a>" + Messages.getString("DebugRunProcessDialog.SISConfigLinkText") + "...</a>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   299
			GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).span(2, 1).grab(true, false).applyTo(link);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   300
			link.addSelectionListener(new SelectionAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   301
				public void widgetSelected(SelectionEvent e) {
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   302
					PreferencesUtil.createPropertyDialogOn(getShell(), project, "com.nokia.carbide.cdt.internal.builder.ui.CarbideBuildConfigurationsPage", null, null).open(); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   303
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   304
			});
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   305
			link.setData(UID, "DebugRunProcessDialog.link"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   306
		} else {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   307
			// not a Carbide project, just an executable.  show a browse/edit combo
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   308
			// to let them select a sis file if they want to.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   309
			final Label sisLabel = new Label(composite, SWT.NONE);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   310
			sisLabel.setText("SIS File to Install:"); //$NON-NLS-1$
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   311
			GridDataFactory.swtDefaults().span(2, 1).applyTo(sisLabel);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   312
			sisLabel.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip")); //$NON-NLS-1$
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   313
			sisLabel.setData(UID, "DebugRunProcessDialog.sisLabel"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   314
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   315
			sisEdit = new Text(composite, SWT.BORDER);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   316
			GridDataFactory.fillDefaults().span(1, 1).align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(sisEdit);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   317
			sisEdit.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   318
			sisEdit.addModifyListener(new ModifyListener() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   319
				public void modifyText(ModifyEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   320
					updateSisFile();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   321
					validate();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   322
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   323
			});
1045
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   324
			String sisPath = data.getSisPath();
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   325
			if (sisPath != null)
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   326
				sisEdit.setText(sisPath);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   327
			sisEdit.setData(UID, "DebugRunProcessDialog.sisEdit"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   328
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   329
			sisBrowse = new Button(composite, SWT.NONE);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   330
			sisBrowse.setText(Messages.getString("DebugRunProcessDialog.BrowseLabel")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   331
			sisBrowse.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   332
			sisBrowse.addSelectionListener(new SelectionAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   333
				public void widgetSelected(SelectionEvent evt) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   334
					FileDialog dialog = new FileDialog(getShell(), SWT.NONE);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   335
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   336
					dialog.setText(Messages.getString("DebugRunProcessDialog.Title")); //$NON-NLS-1$
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   337
					dialog.setFilterExtensions(new String[] {"*.sis*", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   338
					dialog.setFilterNames(new String[] {Messages.getString("DebugRunProcessDialog.InstallFilterName"), Messages.getString("DebugRunProcessDialog.AllFilterName")}); //$NON-NLS-1$ //$NON-NLS-2$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   339
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   340
					BrowseDialogUtils.initializeFrom(dialog, sisEdit);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   341
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   342
					String result = dialog.open();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   343
					if (result != null && new File(result).exists()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   344
						sisEdit.setText(result);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   345
						updateSisFile();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   346
						validate();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   347
					}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   348
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   349
			});
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   350
			sisBrowse.setData(UID, "DebugRunProcessDialog.sisBrowse"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   351
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   352
    }
1045
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   353
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   354
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   355
	private void updateSisFileCombo(ICarbideProjectInfo cpi) {
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   356
		sisFile.add(Messages.getString("DebugRunProcessDialog.NoneItem")); //$NON-NLS-1$
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   357
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   358
		ICarbideBuildConfiguration config = cpi.getDefaultConfiguration();
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   359
		for (ISISBuilderInfo info : config.getSISBuilderInfoList()) {
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   360
			IPath sisPath = info.getSigningType() == ISISBuilderInfo.DONT_SIGN ? info.getUnsignedSISFullPath() : info.getSignedSISFullPath();
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   361
			sisFile.add(sisPath.toOSString());
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   362
		}
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   363
		
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   364
		// select the first sis file if any, otherwise select none
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   365
		if (sisFile.getItemCount() > 1) {
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   366
			sisFile.select(1);
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   367
		} else {
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   368
			sisFile.select(0);
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   369
		}
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   370
		updateSisFile();
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   371
	}
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   372
    
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   373
    
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   374
	/**
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   375
	 * 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   376
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   377
	protected void updateSisFile() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   378
		String sisPath;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   379
    	if (sisFile != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   380
        	sisPath = sisFile.getSelectionIndex() == 0 ? null : sisFile.getText(); //$NON-NLS-1$
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   381
        	data.setSisPath(sisPath);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   382
    	} else if (sisEdit != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   383
    		sisPath = sisEdit.getText();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   384
    		data.setSisPath(sisPath);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   385
    	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   386
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   387
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   388
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   389
	private void updatePackageUI() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   390
		installPackageUI.setEnabled(data.isInstallPackage());
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   391
		for (Control kid : installPackageUI.getChildren())
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   392
			kid.setEnabled(data.isInstallPackage());
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   393
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   394
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   395
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   396
	public void handleEvent(CProjectDescriptionEvent event) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   397
		Shell shell = getShell();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   398
		if (shell == null || shell.isDisposed()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   399
			return;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   400
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   401
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   402
		IProject project = event.getProject() ;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   403
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   404
		if (project != data.getProject()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   405
			return;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   406
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   407
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   408
		if (sisFile != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   409
			ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   410
			if (cpi != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   411
				sisFile.removeAll();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   412
1045
7bd4eb5648d7 bug 10808 tweak UI + validation + fix issues with non-carbide project case
dadubrow
parents: 969
diff changeset
   413
				updateSisFileCombo(cpi);
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   414
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   415
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   416
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   417
	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   418
	protected void initUI() {
1090
02cf64aef519 Fix 10861
dadubrow
parents: 1045
diff changeset
   419
		List<IPath> exes = data.getLaunchableExes();
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   420
		projectExecutableViewer.setInput(exes);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   421
		IPath exeSelectionPath = data.getExeSelectionPath();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   422
		if (exeSelectionPath.equals(Path.EMPTY) && !exes.isEmpty())
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   423
			exeSelectionPath = exes.get(0);
1090
02cf64aef519 Fix 10861
dadubrow
parents: 1045
diff changeset
   424
		if (!Path.EMPTY.equals(exeSelectionPath)) {
02cf64aef519 Fix 10861
dadubrow
parents: 1045
diff changeset
   425
			projectExecutableViewer.setSelection(new StructuredSelection(exeSelectionPath));
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   426
			IPath remotePath = exeSelectionPath;
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   427
			if (remoteProgramViewer != null) {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   428
				if (!remotePathEntries.contains(remotePath)) {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   429
					remotePath = createSuggestedRemotePath(exeSelectionPath);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   430
					remotePathEntries.add(remotePath);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   431
					remoteProgramViewer.add(remotePath);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   432
				}
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   433
				remoteProgramViewer.setSelection(new StructuredSelection(remotePath));
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   434
			}
1090
02cf64aef519 Fix 10861
dadubrow
parents: 1045
diff changeset
   435
		}
02cf64aef519 Fix 10861
dadubrow
parents: 1045
diff changeset
   436
		
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   437
		if (data.getExeSelection() == EExeSelection.USE_PROJECT_EXECUTABLE && exeSelectionPath != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   438
			projectExecutableRadioButton.forceFocus();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   439
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   440
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   441
		if (data.getExeSelection() == EExeSelection.USE_REMOTE_EXECUTABLE && exeSelectionPath != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   442
			remoteExecutableRadioButton.forceFocus();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   443
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   444
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   445
		if (data.getExeSelection() == EExeSelection.ATTACH_TO_PROCESS) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   446
			attachToProcessRadioButton.forceFocus();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   447
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   448
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   449
		handleProjectExecutableRadioSelected();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   450
		handleRemoteExecutableRadioSelected();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   451
		handleAttachToProcessRadioSelected();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   452
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   453
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   454
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   455
	private IPath createSuggestedRemotePath(IPath exeSelectionPath) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   456
		String filename = exeSelectionPath.lastSegment();
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   457
		return PathUtils.createPath("C:/sys/bin").append(filename); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   458
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   459
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   460
	/**
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   461
	 * Allow selecting an executable detected to be built by the program.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   462
	 * @param radioGroup
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   463
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   464
	private void createProjectExecutableRadioButton(Composite radioGroup) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   465
		projectExecutableRadioButton = new Button(radioGroup, SWT.RADIO);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   466
		GridDataFactory.fillDefaults().grab(false, false).applyTo(projectExecutableRadioButton);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   467
		projectExecutableRadioButton.setText(Messages.getString("DebugRunProcessDialog.LaunchProjectExeLabel")); //$NON-NLS-1$
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   468
		projectExecutableRadioButton.setData(UID, "radio_project_executable"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   469
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   470
		projectExecutableViewer = new ComboViewer(radioGroup, SWT.READ_ONLY);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   471
		GridDataFactory.fillDefaults().grab(true, false).applyTo(projectExecutableViewer.getControl());
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   472
		projectExecutableViewer.getControl().setData(UID, "combo_project_executable"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   473
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   474
		projectExecutableViewer.setContentProvider(new ArrayContentProvider());
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   475
		projectExecutableViewer.setLabelProvider(new LabelProvider() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   476
			@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   477
			public String getText(Object element) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   478
				if (element instanceof IPath)
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   479
					return ((IPath) element).lastSegment();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   480
				return super.getText(element);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   481
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   482
		});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   483
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   484
		projectExecutableRadioButton.addSelectionListener(new SelectionAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   485
			@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   486
			public void widgetSelected(SelectionEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   487
				handleProjectExecutableRadioSelected();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   488
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   489
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   490
		});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   491
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   492
		projectExecutableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   493
			
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   494
			public void selectionChanged(SelectionChangedEvent event) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   495
				Object sel = ((IStructuredSelection) event.getSelection()).getFirstElement();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   496
				if (sel instanceof IPath) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   497
					data.setExeSelectionPath((IPath) sel); 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   498
					
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   499
					// track the default remote program from the executable, for easy editing
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   500
					if (remoteProgramViewer != null) {
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   501
						IPath exeSelectionPath = createSuggestedRemotePath(data.getExeSelectionPath());
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   502
						// path should already be in model
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   503
						remoteProgramViewer.setSelection(new StructuredSelection(exeSelectionPath)); 
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   504
					}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   505
					
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   506
					validate();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   507
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   508
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   509
		});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   510
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   511
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   512
	private void handleProjectExecutableRadioSelected() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   513
		if (projectExecutableRadioButton.getSelection()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   514
			projectExecutableViewer.getControl().setEnabled(true);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   515
			data.setExeSelection(EExeSelection.USE_PROJECT_EXECUTABLE);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   516
			IPath selectedPath = (IPath) ((IStructuredSelection) projectExecutableViewer.getSelection()).getFirstElement();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   517
			if (selectedPath != null) {
1185
02373fb1e121 Fix use of PathUtils: do not use new Path() on a Windows format path; this breaks in Linux.
Ed Swartz <ed.swartz@nokia.com>
parents: 1090
diff changeset
   518
				data.setExeSelectionPath(selectedPath);
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   519
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   520
			validate();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   521
		} else {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   522
			projectExecutableViewer.getControl().setEnabled(false);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   523
			// another button becomes active and sets the new launch process
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   524
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   525
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   526
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   527
	/**
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   528
	 * Allow user to enter an executable path.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   529
	 * @param radioGroup
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   530
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   531
	private void createRemoteExecutableRadioButton(Composite radioGroup) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   532
		remoteExecutableRadioButton = new Button(radioGroup, SWT.RADIO);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   533
		GridDataFactory.fillDefaults().grab(false, false).applyTo(remoteExecutableRadioButton);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   534
		remoteExecutableRadioButton.setText(Messages.getString("DebugRunProcessDialog.LaunchRemoteProgLabel")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   535
		
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   536
		remoteExecutableRadioButton.setData(UID, "radio_remote_program"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   537
		
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   538
		remoteProgramViewer = new ComboViewer(radioGroup, SWT.BORDER);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   539
		GridDataFactory.fillDefaults().grab(true, false).applyTo(remoteProgramViewer.getControl());
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   540
		
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   541
		remotePathEntries.addAll(data.getExes());
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   542
		
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   543
		remoteProgramViewer.setContentProvider(new ArrayContentProvider());
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   544
		remoteProgramViewer.setLabelProvider(new LabelProvider() {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   545
			@Override
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   546
			public String getText(Object element) {
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   547
				if (element instanceof IPath)
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   548
					return PathUtils.convertPathToWindows((IPath) element);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   549
				return super.getText(element);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   550
			}
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   551
		});
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   552
		remoteProgramViewer.setInput(remotePathEntries);
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   553
		remoteProgramViewer.getCombo().setVisibleItemCount(remotePathEntries.size());
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   554
		
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   555
		
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   556
		remoteProgramViewer.setData(UID, "combo_remote_program"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   557
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   558
		remoteExecutableRadioButton.addSelectionListener(new SelectionAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   559
			@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   560
			public void widgetSelected(SelectionEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   561
				handleRemoteExecutableRadioSelected();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   562
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   563
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   564
		});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   565
		
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   566
		remoteProgramViewer.getCombo().addModifyListener(new ModifyListener() {
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   567
			public void modifyText(ModifyEvent e) {
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   568
				data.setExeSelectionPath(PathUtils.createPath(remoteProgramViewer.getCombo().getText().trim()));
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   569
				validate();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   570
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   571
		});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   572
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   573
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   574
	private void handleRemoteExecutableRadioSelected() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   575
		if (remoteExecutableRadioButton.getSelection()) {
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   576
			remoteProgramViewer.getControl().setEnabled(true);
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   577
			data.setExeSelection(EExeSelection.USE_REMOTE_EXECUTABLE);
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   578
			IPath path = PathUtils.createPath(remoteProgramViewer.getCombo().getText());
1185
02373fb1e121 Fix use of PathUtils: do not use new Path() on a Windows format path; this breaks in Linux.
Ed Swartz <ed.swartz@nokia.com>
parents: 1090
diff changeset
   579
			data.setExeSelectionPath(path);
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   580
			validate();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   581
		} else {
1284
7ef1318ac801 PNP launch wizard changes: make Remote Program text entry into combo viewer with history
Ed Swartz <ed.swartz@nokia.com>
parents: 1185
diff changeset
   582
			remoteProgramViewer.getControl().setEnabled(false);
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   583
			// another button becomes active and sets the new launch process
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   584
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   585
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   586
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   587
	/**
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   588
	 * Allow user to attach to a process.
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   589
	 * @param radioGroup
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   590
	 */
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   591
	private void createAttachToProcessRadioButton(Composite radioGroup) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   592
		attachToProcessRadioButton = new Button(radioGroup, SWT.RADIO);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   593
		GridDataFactory.fillDefaults().grab(false, false).applyTo(attachToProcessRadioButton);
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   594
		attachToProcessRadioButton.setText(Messages.getString("DebugRunProcessDialog.AttachLabel")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   595
		
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   596
		attachToProcessRadioButton.setData(UID, "radio_attach_to_process"); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   597
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   598
		Label label = new Label(radioGroup, SWT.WRAP);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   599
		GridDataFactory.fillDefaults().grab(false, false).align(SWT.LEFT, SWT.CENTER).applyTo(label);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   600
		
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   601
		label.setText(Messages.getString("DebugRunProcessDialog.AttachAddlMsg")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   602
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   603
		attachToProcessRadioButton.addSelectionListener(new SelectionAdapter() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   604
			@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   605
			public void widgetSelected(SelectionEvent e) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   606
				handleAttachToProcessRadioSelected();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   607
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   608
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   609
		});
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   610
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   611
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   612
	
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   613
	private void handleAttachToProcessRadioSelected() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   614
		if (attachToProcessRadioButton.getSelection()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   615
			data.setExeSelection(EExeSelection.ATTACH_TO_PROCESS);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   616
			data.setExeSelectionPath(null);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   617
			validate();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   618
		} else {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   619
			// another button becomes active and sets the new launch process
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   620
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   621
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   622
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   623
	@Override
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   624
	protected void validate() {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   625
		IStatus status = Status.OK_STATUS;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   626
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   627
		// check launch method
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   628
		IPath exePath = data.getExeSelectionPath(); 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   629
		switch (data.getExeSelection()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   630
		case USE_PROJECT_EXECUTABLE:
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   631
			if (exePath.isEmpty()) {
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   632
				status = error(Messages.getString("DebugRunProcessDialog.NoExesError")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   633
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   634
			break;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   635
		case USE_REMOTE_EXECUTABLE:
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   636
			if (exePath.isEmpty()) {
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   637
				status = error(Messages.getString("DebugRunProcessDialog.EnterPathError")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   638
			} else {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   639
				String exePathString = exePath.toString();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   640
				char drive = exePathString.charAt(0);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   641
				char colon = exePathString.length() < 2 ? 0x0 : exePathString.charAt(1);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   642
				char root = exePathString.length() < 3 ? 0x0 : exePathString.charAt(2);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   643
				char lastChar = exePathString.charAt(exePathString.length() - 1);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   644
				if (!Character.isLetter(drive) || colon != ':' || (root != '\\' && root != '/') || 
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   645
						lastChar == '\\' || lastChar == '/' || lastChar == ':') { 
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   646
					status = error(Messages.getString("DebugRunProcessDialog.AbsolutePathError")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   647
				} else if (exePath.getFileExtension() == null) {
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   648
					status = warning(Messages.getString("DebugRunProcessDialog.FilePathError")); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   649
				}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   650
			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   651
			break;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   652
		case ATTACH_TO_PROCESS:
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   653
			break;
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   654
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   655
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   656
		// check SIS selection
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   657
		if (data.isInstallPackage()) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   658
	    	if (sisEdit != null) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   659
	    		String text = sisEdit.getText().trim();
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   660
	    		if (text.length() > 0) {
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   661
	    			// empty is allowed, but if they specify something, make sure
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   662
	    			// it exists
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   663
	    			File file = new File(text);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   664
	    			if (!file.exists()) {
969
b0dd389735fb externalize strings
dadubrow
parents: 956
diff changeset
   665
	    				status = error(Messages.getString("DebugRunProcessDialog.SISFileExistError"), text); //$NON-NLS-1$
956
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   666
	    			}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   667
	    		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   668
	    	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   669
		}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   670
		
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   671
		updateStatus(status);
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   672
	}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   673
}
d1e221a2875f new launch wizard implementation
dadubrow
parents:
diff changeset
   674