Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: dart/editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/dialogs/CreateLaunchAction.java

Issue 321583008: Merge to trunk cl - fixes/features for mobile support in the editor (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698