1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 15:05:36 +02:00

Bug 267801 - Open Declaration hangs in deadlock

This commit is contained in:
Anton Leherbauer 2009-03-10 14:54:22 +00:00
parent 2e65ed8af0
commit 2e6ebd77d4

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2008 IBM Corporation and others. * Copyright (c) 2005, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -97,14 +97,15 @@ public class CReconcilingStrategy implements IReconcilingStrategy, IReconcilingS
index= ast.getIndex(); index= ast.getIndex();
} }
try { try {
if (ast == null || fProgressMonitor.isCanceled()) { final boolean canceled = fProgressMonitor.isCanceled();
if (ast == null || canceled) {
((ICReconcilingListener)fEditor).reconciled(null, forced, fProgressMonitor); ((ICReconcilingListener)fEditor).reconciled(null, forced, fProgressMonitor);
} else { } else {
synchronized (ast) { synchronized (ast) {
((ICReconcilingListener)fEditor).reconciled(ast, forced, fProgressMonitor); ((ICReconcilingListener)fEditor).reconciled(ast, forced, fProgressMonitor);
} }
} }
if (fProgressMonitor.isCanceled()) { if (canceled) {
aboutToBeReconciled(); aboutToBeReconciled();
} }
} catch(Exception e) { } catch(Exception e) {
@ -114,7 +115,6 @@ public class CReconcilingStrategy implements IReconcilingStrategy, IReconcilingS
if (index != null) { if (index != null) {
index.releaseReadLock(); index.releaseReadLock();
} }
fProgressMonitor.setCanceled(false);
} }
} }
} }