1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 314258 - [console] Cannot have both stdout in console and in file

This commit is contained in:
Pawel Piech 2010-05-27 16:40:14 +00:00
parent 3c7225052b
commit c48835544d

View file

@ -10,11 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.dsf.debug.model;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.Launch;
import org.eclipse.debug.core.model.ISourceLocator;
@ -35,27 +31,6 @@ public class DsfLaunch extends Launch {
*/
private static final String PREF_SHOW_FULL_PATHS = "org.eclipse.cdt.debug.ui.cDebug.show_full_paths"; //$NON-NLS-1$
private class EventSchedulingRule implements ISchedulingRule {
DsfLaunch fLaunch = DsfLaunch.this;
public boolean isConflicting(ISchedulingRule rule) {
if (rule instanceof EventSchedulingRule) {
return fLaunch.equals( ((EventSchedulingRule)rule).fLaunch );
}
return false;
}
public boolean contains(ISchedulingRule rule) {
if (rule instanceof EventSchedulingRule) {
return fLaunch.equals( ((EventSchedulingRule)rule).fLaunch );
}
return false;
}
};
private EventSchedulingRule fEventSchedulingRule = new EventSchedulingRule();
public DsfLaunch(ILaunchConfiguration launchConfiguration, String mode, ISourceLocator locator) {
super(launchConfiguration, mode, locator);
@ -67,34 +42,19 @@ public class DsfLaunch extends Launch {
@Override
protected void fireChanged() {
new Job("Dispatch DSF Launch Changed event.") { //$NON-NLS-1$
{
setSystem(true);
setRule(fEventSchedulingRule);
}
@Override
protected IStatus run(IProgressMonitor monitor) {
DebugPlugin.getDefault().asyncExec(new Runnable() {
public void run() {
DsfLaunch.super.fireChanged();
return Status.OK_STATUS;
}
}.schedule();
});
}
@Override
protected void fireTerminate() {
new Job("Dispatch DSF Launch Terminate event.") { //$NON-NLS-1$
{
setSystem(true);
setRule(fEventSchedulingRule);
}
@Override
protected IStatus run(IProgressMonitor monitor) {
DebugPlugin.getDefault().asyncExec(new Runnable() {
public void run() {
DsfLaunch.super.fireTerminate();
return Status.OK_STATUS;
}
}.schedule();
});
}
}