Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 293995 | Differences between
and this patch

Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java (-3 / +14 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 24-29 Link Here
24
import org.eclipse.core.runtime.NullProgressMonitor;
24
import org.eclipse.core.runtime.NullProgressMonitor;
25
import org.eclipse.core.runtime.Status;
25
import org.eclipse.core.runtime.Status;
26
26
27
import org.eclipse.jface.util.Util;
27
import org.eclipse.jface.viewers.StyledCellLabelProvider;
28
import org.eclipse.jface.viewers.StyledCellLabelProvider;
28
import org.eclipse.jface.viewers.StyledString;
29
import org.eclipse.jface.viewers.StyledString;
29
30
Lines 297-304 Link Here
297
	 * @throws CoreException thrown when the change could not be created
298
	 * @throws CoreException thrown when the change could not be created
298
	 */
299
	 */
299
	public synchronized final Change getChange() throws CoreException {
300
	public synchronized final Change getChange() throws CoreException {
300
		if (fChange == null) {
301
		if (Util.isGtk()) {
301
			fChange= createChange();
302
			// workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=293995 :
303
			// [Widgets] Deadlock while UI thread displaying/computing a change proposal and non-UI thread creating image
304
			if (fChange == null) {
305
				fChange= createChange();
306
			}
307
		} else {
308
			synchronized (this) {
309
				if (fChange == null) {
310
					fChange= createChange();
311
				}
312
			}
302
		}
313
		}
303
		return fChange;
314
		return fChange;
304
	}
315
	}

Return to bug 293995