OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Dart project authors. | 2 * Copyright 2012 Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
11 * or implied. See the License for the specific language governing permissions a
nd limitations under | 11 * or implied. See the License for the specific language governing permissions a
nd limitations under |
12 * the License. | 12 * the License. |
13 */ | 13 */ |
14 | 14 |
15 package com.google.dart.tools.debug.ui.internal.dialogs; | 15 package com.google.dart.tools.debug.ui.internal.dialogs; |
16 | 16 |
| 17 import com.google.dart.tools.debug.core.DartDebugCorePlugin; |
| 18 import com.google.dart.tools.debug.core.DartLaunchConfigWrapper; |
17 import com.google.dart.tools.debug.ui.internal.DartDebugUIPlugin; | 19 import com.google.dart.tools.debug.ui.internal.DartDebugUIPlugin; |
18 import com.google.dart.tools.debug.ui.internal.DebugErrorHandler; | 20 import com.google.dart.tools.debug.ui.internal.DebugErrorHandler; |
19 import com.google.dart.tools.ui.actions.InstrumentedAction; | 21 import com.google.dart.tools.ui.actions.InstrumentedAction; |
20 import com.google.dart.tools.ui.instrumentation.UIInstrumentationBuilder; | 22 import com.google.dart.tools.ui.instrumentation.UIInstrumentationBuilder; |
21 | 23 |
22 import org.eclipse.core.runtime.CoreException; | 24 import org.eclipse.core.runtime.CoreException; |
23 import org.eclipse.debug.core.DebugPlugin; | 25 import org.eclipse.debug.core.DebugPlugin; |
24 import org.eclipse.debug.core.ILaunchConfigurationType; | 26 import org.eclipse.debug.core.ILaunchConfigurationType; |
25 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; | 27 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; |
26 import org.eclipse.debug.ui.DebugUITools; | 28 import org.eclipse.debug.ui.DebugUITools; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 83 } |
82 | 84 |
83 protected void create(ILaunchConfigurationType configType) { | 85 protected void create(ILaunchConfigurationType configType) { |
84 try { | 86 try { |
85 ILaunchConfigurationWorkingCopy wc = configType.newInstance( | 87 ILaunchConfigurationWorkingCopy wc = configType.newInstance( |
86 null, | 88 null, |
87 DebugPlugin.getDefault().getLaunchManager().generateLaunchConfiguratio
nName("New launch")); | 89 DebugPlugin.getDefault().getLaunchManager().generateLaunchConfiguratio
nName("New launch")); |
88 | 90 |
89 // TODO(devoncarew): init this launch config with a starting resource and
name | 91 // TODO(devoncarew): init this launch config with a starting resource and
name |
90 | 92 |
| 93 if (configType.getIdentifier().equals(DartDebugCorePlugin.MOBILE_LAUNCH_CO
NFIG_ID)) { |
| 94 DartLaunchConfigWrapper wrapper = new DartLaunchConfigWrapper(wc); |
| 95 wrapper.setUsePubServe(false); |
| 96 } |
91 wc.doSave(); | 97 wc.doSave(); |
92 | 98 |
93 launchConfigurationDialog.selectLaunchConfiguration(wc.getName()); | 99 launchConfigurationDialog.selectLaunchConfiguration(wc.getName()); |
94 } catch (CoreException exception) { | 100 } catch (CoreException exception) { |
95 DebugErrorHandler.errorDialog( | 101 DebugErrorHandler.errorDialog( |
96 launchConfigurationDialog.getShell(), | 102 launchConfigurationDialog.getShell(), |
97 "Error Created Launch", | 103 "Error Created Launch", |
98 "Unable to create the selected launch: " + exception.toString(), | 104 "Unable to create the selected launch: " + exception.toString(), |
99 exception); | 105 exception); |
100 } | 106 } |
101 } | 107 } |
102 | 108 |
103 @Override | 109 @Override |
104 protected void doRun(Event event, UIInstrumentationBuilder instrumentation) { | 110 protected void doRun(Event event, UIInstrumentationBuilder instrumentation) { |
105 create(configType); | 111 create(configType); |
106 | 112 |
107 } | 113 } |
108 | 114 |
109 } | 115 } |
OLD | NEW |