Bug 92135 - Output out of sync with process when debugging
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ProjectCreationDecorator.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ProjectCreationDecorator.java
index fa00f09..58797ab 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ProjectCreationDecorator.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/ProjectCreationDecorator.java
@@ -164,6 +164,7 @@
preferenceStore.setValue(IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE, MessageDialogWithToggle.NEVER);
preferenceStore.setValue(IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD, MessageDialogWithToggle.ALWAYS);
preferenceStore.setValue(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR, MessageDialogWithToggle.ALWAYS);
+ preferenceStore.setValue(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH, MessageDialogWithToggle.NEVER);
preferenceStore = JDIDebugUIPlugin.getDefault().getPreferenceStore();
// Don't warn about HCR failures
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
index 62c9c86..e0ebc11 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
@@ -15,6 +15,7 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
+import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.console.IConsole;
import org.eclipse.debug.ui.console.IConsoleLineTrackerExtension;
import org.eclipse.jdt.debug.testplugin.ConsoleLineTracker;
@@ -46,7 +47,7 @@
tagAsSummary("Process Console 10,000 lines: plain output", Dimension.ELAPSED_PROCESS);
runConsole80CharsTest(10000, 10);
}
-
+
public void testProcessConsoleStackTraceOutput10000Lines() throws Exception {
tagAsSummary("Process Console 10,000 lines: stack trace output", Dimension.ELAPSED_PROCESS);
runStackTrace(5000, 10); // 2 lines * 5000 repeats = 10000 lines
@@ -151,9 +152,15 @@
fWarmingUp = false;
}
- protected void launchWorkingCopyAndWait(ILaunchConfigurationWorkingCopy workingCopy) throws Exception {
- System.gc();
- workingCopy.launch(ILaunchManager.RUN_MODE, null, false);
+ protected void launchWorkingCopyAndWait(final ILaunchConfigurationWorkingCopy workingCopy) throws Exception {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ DebugUITools.launch(workingCopy, ILaunchManager.RUN_MODE);
+ }
+ };
+
+ DebugUIPlugin.getStandardDisplay().asyncExec(runnable);
+
synchronized (fLock) {
if (!fStopped) {
fLock.wait(360000);