Bug 79793 Deadlock in JavaWorkingSetUpdater
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/JavaWorkingSetUpdater.java
}
	
	public JavaWorkingSetUpdater() {
		fWorkingSets= new ArrayList();
	}
	
	/**
	 * {@inheritDoc}
	 */
	public void add(IWorkingSet workingSet) {
		synchronized (fWorkingSets) {
			checkElementExistence(workingSet);
			fWorkingSets.add(workingSet);
		}
		if (fListener == null) {
			fListener= this;
			JavaCore.addElementChangedListener(fListener);
		}
	}
	/**
	 * {@inheritDoc}
	 */
	public boolean remove(IWorkingSet workingSet) {
		boolean result= false;
		synchronized(fWorkingSets) {
			result= fWorkingSets.remove(workingSet);
		}
		if (fWorkingSets.size() == 0) {
			JavaCore.removeElementChangedListener(fListener);
			fListener= null;