Chromium Code Reviews| Index: editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/console/DartConsoleView.java |
| =================================================================== |
| --- editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/console/DartConsoleView.java (revision 38141) |
| +++ editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/console/DartConsoleView.java (working copy) |
| @@ -14,6 +14,8 @@ |
| package com.google.dart.tools.ui.console; |
| +import com.google.dart.tools.debug.core.DartDebugCorePlugin; |
| +import com.google.dart.tools.debug.core.DartLaunchConfigWrapper; |
| import com.google.dart.tools.debug.ui.launch.OpenObservatoryAction; |
| import com.google.dart.tools.debug.ui.launch.StopPubServeAction; |
| import com.google.dart.tools.deploy.Activator; |
| @@ -23,12 +25,15 @@ |
| import com.google.dart.tools.ui.internal.preferences.FontPreferencePage; |
| import com.google.dart.tools.ui.internal.util.SWTUtil; |
| +import org.eclipse.core.runtime.CoreException; |
| import org.eclipse.debug.core.DebugException; |
| import org.eclipse.debug.core.DebugPlugin; |
| import org.eclipse.debug.core.ILaunch; |
| +import org.eclipse.debug.core.ILaunchConfiguration; |
| import org.eclipse.debug.core.ILaunchesListener2; |
| import org.eclipse.debug.core.model.IProcess; |
| import org.eclipse.debug.internal.ui.views.console.ProcessConsole; |
| +import org.eclipse.debug.ui.IDebugUIConstants; |
| import org.eclipse.jface.action.Action; |
| import org.eclipse.jface.action.IAction; |
| import org.eclipse.jface.action.IToolBarManager; |
| @@ -47,6 +52,7 @@ |
| import org.eclipse.ui.console.IConsole; |
| import org.eclipse.ui.console.IConsoleView; |
| import org.eclipse.ui.console.IOConsole; |
| +import org.eclipse.ui.console.IOConsoleOutputStream; |
| import org.eclipse.ui.console.MessageConsole; |
| import org.eclipse.ui.console.TextConsole; |
| import org.eclipse.ui.dialogs.PreferencesUtil; |
| @@ -56,6 +62,8 @@ |
| import org.eclipse.ui.part.ViewPart; |
| import org.eclipse.ui.progress.IWorkbenchSiteProgressService; |
| +import java.io.IOException; |
| + |
| /** |
| * An Eclipse view class that displays one and only one IConsole. This is different from the normal |
| * ConsoleView which displays n consoles. |
| @@ -318,6 +326,7 @@ |
| if (console instanceof ProcessConsole) { |
| IProcess process = ((ProcessConsole) console).getProcess(); |
| openObservatoryAction.updateEnablement(process.getLaunch()); |
| + showPauseOnStartMessage(process.getLaunch().getLaunchConfiguration()); |
| } |
| } |
| @@ -488,6 +497,24 @@ |
| } |
| } |
| + private void showPauseOnStartMessage(ILaunchConfiguration config) { |
| + try { |
| + if (config.getType().getIdentifier().equals(DartDebugCorePlugin.SERVER_LAUNCH_CONFIG_ID)) { |
| + DartLaunchConfigWrapper wrapper = new DartLaunchConfigWrapper(config); |
| + if (wrapper.getPauseIsolateOnStart()) { |
| + IOConsoleOutputStream stream = ((ProcessConsole) getConsole()).getStream(IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM); |
| + try { |
| + stream.write("Isolate paused on start. Use the Observatory to release it.\n"); |
|
danrubel
2014/07/14 16:22:17
How about "Isolate paused on start waiting for Obs
keertip
2014/07/15 07:49:49
How about "Isolate paused on start. Click on the
danrubel
2014/07/15 12:54:57
Sgtm!
|
| + } catch (IOException e) { |
| + // do nothing |
| + } |
| + } |
| + } |
| + } catch (CoreException e) { |
| + // do nothing |
| + } |
| + } |
| + |
| private void updateContentDescription() { |
| if (console instanceof ProcessConsole) { |
| IProcess process = ((ProcessConsole) console).getProcess(); |