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 http://www.eclipse.org/legal/epl-v10.html 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$
		setDaemon(true);
		this;
        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 {
				AntEditorCompletionProcessor.resetCodeCompletionDataStructures();
                ProjectHelper.reset();
catch (InterruptedException x) {
			}
		}
	}

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