OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. | 2 * Copyright (c) 2012, the 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 package com.google.dart.tools.debug.ui.launch; | 14 package com.google.dart.tools.debug.ui.launch; |
15 | 15 |
16 import com.google.dart.tools.debug.ui.internal.DartDebugUIPlugin; | 16 import com.google.dart.tools.debug.ui.internal.DartDebugUIPlugin; |
17 import com.google.dart.tools.debug.ui.internal.DebugErrorHandler; | 17 import com.google.dart.tools.debug.ui.internal.DebugErrorHandler; |
18 import com.google.dart.tools.debug.ui.internal.util.LaunchUtils; | 18 import com.google.dart.tools.debug.ui.internal.util.LaunchUtils; |
19 import com.google.dart.tools.ui.instrumentation.UIInstrumentationBuilder; | 19 import com.google.dart.tools.ui.instrumentation.UIInstrumentationBuilder; |
20 | 20 |
21 import org.eclipse.core.resources.IResource; | 21 import org.eclipse.core.resources.IResource; |
22 import org.eclipse.debug.core.ILaunchManager; | |
23 import org.eclipse.debug.ui.ILaunchShortcut; | 22 import org.eclipse.debug.ui.ILaunchShortcut; |
24 import org.eclipse.jface.action.IAction; | 23 import org.eclipse.jface.action.IAction; |
25 import org.eclipse.jface.viewers.ISelection; | 24 import org.eclipse.jface.viewers.ISelection; |
26 import org.eclipse.jface.viewers.StructuredSelection; | 25 import org.eclipse.jface.viewers.StructuredSelection; |
27 import org.eclipse.ui.IWorkbenchWindow; | 26 import org.eclipse.ui.IWorkbenchWindow; |
28 | 27 |
29 /** | 28 /** |
30 * Launch on Mobile | 29 * Launch on Mobile |
31 */ | 30 */ |
32 public class RunOnMobileAction extends DartRunAbstractAction { | 31 public class RunOnMobileAction extends DartRunAbstractAction { |
(...skipping 29 matching lines...) Expand all Loading... |
62 } | 61 } |
63 } catch (Exception exception) { | 62 } catch (Exception exception) { |
64 instrumentation.metric("Problem", "Exception launching " + exception.getCl
ass().toString()); | 63 instrumentation.metric("Problem", "Exception launching " + exception.getCl
ass().toString()); |
65 instrumentation.data("Problem", "Exception launching " + exception.toStrin
g()); | 64 instrumentation.data("Problem", "Exception launching " + exception.toStrin
g()); |
66 | 65 |
67 DebugErrorHandler.errorDialog(window.getShell(), "Error Launching", "Unabl
e to launch " | 66 DebugErrorHandler.errorDialog(window.getShell(), "Error Launching", "Unabl
e to launch " |
68 + resource.getName() + ".", exception); | 67 + resource.getName() + ".", exception); |
69 } | 68 } |
70 } | 69 } |
71 | 70 |
72 @Override | |
73 protected void launch(ILaunchShortcut shortcut, ISelection selection, | |
74 UIInstrumentationBuilder instrumentation) { | |
75 instrumentation.record(selection); | |
76 //TODO (danrubel): change to DEBUG_MODE when supported by removing this meth
od | |
77 // and allowing superclass to provide implementation | |
78 shortcut.launch(selection, ILaunchManager.RUN_MODE); | |
79 } | |
80 | |
81 } | 71 } |
OLD | NEW |