mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Bug 314258 - [console] Cannot have both stdout in console and in file
This commit is contained in:
parent
3c7225052b
commit
c48835544d
1 changed files with 7 additions and 47 deletions
|
@ -10,11 +10,7 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.debug.model;
|
package org.eclipse.cdt.dsf.debug.model;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.debug.core.DebugPlugin;
|
||||||
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.ILaunchConfiguration;
|
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||||
import org.eclipse.debug.core.Launch;
|
import org.eclipse.debug.core.Launch;
|
||||||
import org.eclipse.debug.core.model.ISourceLocator;
|
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 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) {
|
public DsfLaunch(ILaunchConfiguration launchConfiguration, String mode, ISourceLocator locator) {
|
||||||
super(launchConfiguration, mode, locator);
|
super(launchConfiguration, mode, locator);
|
||||||
|
|
||||||
|
@ -67,34 +42,19 @@ public class DsfLaunch extends Launch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void fireChanged() {
|
protected void fireChanged() {
|
||||||
new Job("Dispatch DSF Launch Changed event.") { //$NON-NLS-1$
|
DebugPlugin.getDefault().asyncExec(new Runnable() {
|
||||||
{
|
public void run() {
|
||||||
setSystem(true);
|
|
||||||
setRule(fEventSchedulingRule);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
|
||||||
DsfLaunch.super.fireChanged();
|
DsfLaunch.super.fireChanged();
|
||||||
return Status.OK_STATUS;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}.schedule();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void fireTerminate() {
|
protected void fireTerminate() {
|
||||||
new Job("Dispatch DSF Launch Terminate event.") { //$NON-NLS-1$
|
DebugPlugin.getDefault().asyncExec(new Runnable() {
|
||||||
{
|
public void run() {
|
||||||
setSystem(true);
|
|
||||||
setRule(fEventSchedulingRule);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
|
||||||
DsfLaunch.super.fireTerminate();
|
DsfLaunch.super.fireTerminate();
|
||||||
return Status.OK_STATUS;
|
|
||||||
}
|
}
|
||||||
}.schedule();
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue