mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-17 14:05:23 +02:00
[379454] [shells] too many output refresh jobs created when populating shell output
This commit is contained in:
parent
19efbd6407
commit
87f575eef5
1 changed files with 8 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
* Copyright (c) 2006, 2012 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [225510][api] Fix OutputRefreshJob API leakage
|
* Martin Oberhuber (Wind River) - [225510][api] Fix OutputRefreshJob API leakage
|
||||||
|
* David McKnight (IBM) - [379454] [shells] too many output refresh jobs created when populating shell output
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
|
package org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem;
|
||||||
|
@ -88,16 +89,7 @@ public class ServiceCommandShell extends RemoteCommandShell implements IServiceC
|
||||||
outputs[i] = output;
|
outputs[i] = output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// FIXME unify with notifyListeners() below?
|
notifyOutputChanged(outputs, false);
|
||||||
if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
|
|
||||||
{
|
|
||||||
_lastRefreshJob = new OutputRefreshJob(this, outputs, false);
|
|
||||||
_lastRefreshJob.schedule();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_lastRefreshJob.addOutputs(outputs);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -109,15 +101,14 @@ public class ServiceCommandShell extends RemoteCommandShell implements IServiceC
|
||||||
* @since org.eclipse.rse.subsystems.shells.core 3.0
|
* @since org.eclipse.rse.subsystems.shells.core 3.0
|
||||||
*/
|
*/
|
||||||
protected void notifyOutputChanged(IRemoteOutput[] outputs, boolean cwdChanged) {
|
protected void notifyOutputChanged(IRemoteOutput[] outputs, boolean cwdChanged) {
|
||||||
// if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
|
if (_lastRefreshJob == null || _lastRefreshJob.isComplete()){
|
||||||
{
|
|
||||||
_lastRefreshJob = new OutputRefreshJob(this, outputs, cwdChanged);
|
_lastRefreshJob = new OutputRefreshJob(this, outputs, cwdChanged);
|
||||||
_lastRefreshJob.schedule();
|
_lastRefreshJob.schedule();
|
||||||
}
|
}
|
||||||
/*
|
else {
|
||||||
* else { _lastRefreshJob.addOutputs(outputs);
|
_lastRefreshJob.addOutputs(outputs);
|
||||||
* _lastRefreshJob.schedule(); }
|
_lastRefreshJob.schedule();
|
||||||
*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICandidateCommand[] getCandidateCommands()
|
public ICandidateCommand[] getCandidateCommands()
|
||||||
|
|
Loading…
Add table
Reference in a new issue