Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2004, 2005 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 which accompanies this distribution, and is available at Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.ant.internal.ui.editor;
	private static final int fgDelay= 6000 * 5; //5 minutes 
		if ( == null) {
		return ;

Creates a new background thread. The thread runs with minimal priority.
		super("Decay Ant Data Structures"); //$NON-NLS-1$
        setContextClassLoader(null); //don't hold on to any class loaders

The background activity that is triggered when the last AntModel is disposed. Waits for the required delay and then nulls out the memory expensive Ant code completion data structures and reset the ProjectHelper. If an AntModel is created during the wait, the thread is interrupted and no nulling out occurs.
	public void run() {
		synchronized (this) {
			try {
catch (InterruptedException x) {

Cancels the background thread.
	public static void cancel() {
		if ( != null) {
			synchronized () {
New to GrepCode? Check out our FAQ X