[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem ServiceCommandShell.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem
In directory dev1:/tmp/cvs-serv23946/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem

Modified Files:
	ServiceCommandShell.java 
Log Message:
 [379454] [shells] too many output refresh jobs created when populating shell output


Index: ServiceCommandShell.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/servicesubsystem/ServiceCommandShell.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ServiceCommandShell.java	3 Apr 2008 09:44:53 -0000	1.9
--- ServiceCommandShell.java	14 May 2012 17:39:00 -0000	1.10
***************
*** 1,4 ****
  /*******************************************************************************
!  * Copyright (c) 2006, 2008 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
--- 1,4 ----
  /*******************************************************************************
!  * Copyright (c) 2006, 2012 IBM Corporation and others.
   * All rights reserved. This program and the accompanying materials
   * are made available under the terms of the Eclipse Public License v1.0
***************
*** 14,17 ****
--- 14,18 ----
   * Contributors:
   * 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
   *******************************************************************************/
  
***************
*** 89,102 ****
  			}
  		}
! 		// FIXME unify with notifyListeners() below?
! 		if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
! 		{
! 			_lastRefreshJob = new OutputRefreshJob(this, outputs, false);
! 			_lastRefreshJob.schedule();
! 		}
! 		else
! 		{
! 			_lastRefreshJob.addOutputs(outputs);
! 		}
  	}
  
--- 90,94 ----
  			}
  		}
! 		notifyOutputChanged(outputs, false);
  	}
  
***************
*** 110,122 ****
  	 */
  	protected void notifyOutputChanged(IRemoteOutput[] outputs, boolean cwdChanged) {
! 		// if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
! 		{
  			_lastRefreshJob = new OutputRefreshJob(this, outputs, cwdChanged);
  			_lastRefreshJob.schedule();
  		}
! 		/*
! 		 * else { _lastRefreshJob.addOutputs(outputs);
! 		 * _lastRefreshJob.schedule(); }
! 		 */
  	}
  
--- 102,113 ----
  	 */
  	protected void notifyOutputChanged(IRemoteOutput[] outputs, boolean cwdChanged) {
! 		if (_lastRefreshJob == null || _lastRefreshJob.isComplete()){
  			_lastRefreshJob = new OutputRefreshJob(this, outputs, cwdChanged);
  			_lastRefreshJob.schedule();
  		}
! 		else {
! 			_lastRefreshJob.addOutputs(outputs);
! 			_lastRefreshJob.schedule(); 
! 		}
  	}