author | Ed Swartz <ed.swartz@nokia.com> |
Wed, 21 Apr 2010 15:10:34 -0500 | |
changeset 1260 | f3b387a17eb7 |
parent 1171 | 651ae39eb566 |
child 1968 | 3482df86a51d |
permissions | -rw-r--r-- |
956 | 1 |
/* |
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* |
|
16 |
*/ |
|
17 |
package com.nokia.cdt.internal.debug.launch; |
|
18 |
||
19 |
import org.eclipse.cdt.debug.core.executables.Executable; |
|
20 |
import org.eclipse.core.resources.IProject; |
|
1171
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
21 |
import org.eclipse.core.runtime.CoreException; |
956 | 22 |
import org.eclipse.core.runtime.IPath; |
1171
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
23 |
import org.eclipse.debug.core.ILaunchConfiguration; |
956 | 24 |
|
25 |
import com.nokia.carbide.remoteconnections.interfaces.IService; |
|
1171
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
26 |
import com.nokia.cdt.debug.cw.symbian.SettingsData; |
956 | 27 |
import com.nokia.cdt.internal.debug.launch.LaunchPlugin.ILaunchCreationWizardFactory; |
28 |
import com.nokia.cdt.internal.debug.launch.newwizard.LaunchWizard; |
|
29 |
import com.nokia.cdt.internal.debug.launch.wizard.ILaunchCreationWizard; |
|
30 |
import com.nokia.cdt.internal.debug.launch.wizard.LaunchOptions; |
|
31 |
||
32 |
public class PhoneLaunchShortcut extends AbstractSymbianLaunchShortcut { |
|
33 |
||
1171
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
34 |
/* (non-Javadoc) |
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
35 |
* @see com.nokia.cdt.internal.debug.launch.AbstractSymbianLaunchShortcut#isSupportedConfiguration(org.eclipse.debug.core.ILaunchConfiguration) |
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
36 |
*/ |
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
37 |
@Override |
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
38 |
protected boolean isSupportedConfiguration(ILaunchConfiguration config) |
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
39 |
throws CoreException { |
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
40 |
return SettingsData.isAppTRKConfiguration(config) || SettingsData.isSysTRKConfiguration(config); |
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
41 |
} |
651ae39eb566
Bug 11013: choose appropriate launch configs when using Run/Debug As... shortcut and show selection when more than one is available.
Ed Swartz <ed.swartz@nokia.com>
parents:
956
diff
changeset
|
42 |
|
956 | 43 |
@Override |
44 |
protected void launchProject(IProject project, Executable executable, IPath defaultMMP, String mode) { |
|
45 |
LaunchPlugin.getDefault().launchProject(project, executable, defaultMMP, mode, |
|
46 |
new ILaunchCreationWizardFactory() { |
|
47 |
public ILaunchCreationWizard createLaunchCreationWizard(LaunchOptions launchOptions) throws Exception { |
|
1260
f3b387a17eb7
Merge PlatSim changes from 2.x, but move ILaunchDelegateConnectionExtension into com.nokia.cdt.debug.common so EDC can use it
Ed Swartz <ed.swartz@nokia.com>
parents:
1171
diff
changeset
|
48 |
IService trkService = LaunchPlugin.getTRKService(); |
956 | 49 |
LaunchWizard launchWizard = new LaunchWizard(launchOptions, trkService); |
50 |
return launchWizard; |
|
51 |
}; |
|
52 |
}); |
|
53 |
} |
|
54 |
} |