diff options
author | Markus Duft | 2017-01-25 17:01:40 +0000 |
---|---|---|
committer | Sarika Sinha | 2017-02-06 08:11:11 +0000 |
commit | 11d8e4118051e4830ab9676c41821f63848387e5 (patch) | |
tree | 252d968ca8ba3534f6a8d8cfdf960fd4aecb4ab4 | |
parent | 91f1da22c866d8d9763cbfbdcf7e8d7fc327be02 (diff) | |
download | eclipse.platform.debug-11d8e4118051e4830ab9676c41821f63848387e5.tar.gz eclipse.platform.debug-11d8e4118051e4830ab9676c41821f63848387e5.tar.xz eclipse.platform.debug-11d8e4118051e4830ab9676c41821f63848387e5.zip |
Bug 510990 - don't FAIL if regex doesn't match, but don't continue
Change-Id: I437f0bbd361a942761f114dc067ed532a182a474
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
3 files changed, 10 insertions, 8 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java index e3bb0ccc7..bad512a5d 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java @@ -33,7 +33,6 @@ public class DebugCoreMessages extends NLS { public static String DebugPlugin_Eclipse_runtime_does_not_support_working_directory_2; public static String EnvironmentVariableResolver_0; public static String GroupLaunchConfigurationDelegate_waiting; - public static String GroupLaunchConfigurationDelegate_failedWait; public static String GroupLaunchConfigurationDelegate_Delay; public static String GroupLaunchConfigurationDelegate_Delaying; public static String GroupLaunchConfigurationDelegate_Launching; diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties index eb9e35f51..aa28a244a 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties @@ -27,7 +27,6 @@ DebugPlugin_7=An exception occurred while filtering debug events. DebugPlugin_8=An exception occurred while dispatching debug events. EnvironmentVariableResolver_0=Environment variable not specified GroupLaunchConfigurationDelegate_waiting=Waiting for ''{0}'' on the console of ''{1}''. -GroupLaunchConfigurationDelegate_failedWait=Failed to await output ''{0}'' on the console of ''{1}''. GroupLaunchConfigurationDelegate_Delay=Delay GroupLaunchConfigurationDelegate_Delaying=Delaying next launch by {0} seconds GroupLaunchConfigurationDelegate_Launching=Launching ''{0}'' diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java index 69885d7cd..fbd3397d4 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java @@ -120,7 +120,9 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat IStatusHandler cycleHandler = DebugPlugin.getDefault().getStatusHandler(GROUP_CYCLE); cycleHandler.handleStatus(GROUP_CYCLE, conf.getName()); } else { - launchChild(progress.newChild(1000 / launches.size()), group, le, conf, localMode, (i == launches.size() - 1)); + if (!launchChild(progress.newChild(1000 / launches.size()), group, le, conf, localMode, (i == launches.size() - 1))) { + break; + } } // in case the group has been terminated while waiting in the @@ -142,7 +144,7 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat } } - private void launchChild(SubMonitor monitor, final GroupLaunch group, GroupLaunchElement le, final ILaunchConfiguration child, final String localMode, boolean lastConfig) throws CoreException { + private boolean launchChild(SubMonitor monitor, final GroupLaunch group, GroupLaunchElement le, final ILaunchConfiguration child, final String localMode, boolean lastConfig) throws CoreException { final Set<ILaunch> running = le.adoptIfRunning ? findRunningLaunch(le.name) : Collections.emptySet(); ILaunch subLaunch = running.stream().findFirst().orElse(null); if (subLaunch == null) { @@ -170,13 +172,13 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat group.markLaunched(); } - postLaunchAction(subLaunch, le, monitor); + return postLaunchAction(subLaunch, le, monitor); } - private void postLaunchAction(ILaunch subLaunch, GroupLaunchElement le, IProgressMonitor monitor) { + private boolean postLaunchAction(ILaunch subLaunch, GroupLaunchElement le, IProgressMonitor monitor) { switch (le.action) { case NONE: - return; + return true; case WAIT_FOR_TERMINATION: monitor.subTask(NLS.bind(DebugCoreMessages.GroupLaunchConfigurationDelegate_Waiting_for_termination, subLaunch.getLaunchConfiguration().getName())); while (!subLaunch.isTerminated() && !monitor.isCanceled()) { @@ -205,7 +207,7 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat if (regexp != null) { monitor.subTask(NLS.bind(DebugCoreMessages.GroupLaunchConfigurationDelegate_waiting, regexp, subLaunch.getLaunchConfiguration().getName())); if (!waitForOutputMatching(subLaunch, monitor, regexp)) { - throw new RuntimeException(NLS.bind(DebugCoreMessages.GroupLaunchConfigurationDelegate_failedWait, regexp, le.name)); + return false; } } @@ -214,6 +216,8 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat default: assert false : "new post launch action type is missing logic"; //$NON-NLS-1$ } + + return true; } // blocks until a specific string is in the log output |