mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Fix bug in getResolvedEntries
This commit is contained in:
parent
e50393060e
commit
4b87d64900
1 changed files with 12 additions and 6 deletions
|
@ -45,9 +45,11 @@ import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.ISafeRunnable;
|
import org.eclipse.core.runtime.ISafeRunnable;
|
||||||
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Plugin;
|
import org.eclipse.core.runtime.Plugin;
|
||||||
|
import org.eclipse.core.runtime.Status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author alain
|
* @author alain
|
||||||
|
@ -108,7 +110,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
} else {
|
} else {
|
||||||
IPathEntry e = getExpandedPathEntry(entry, cproject);
|
IPathEntry e = getExpandedPathEntry(entry, cproject);
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
list.add(entry);
|
list.add(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -414,9 +416,9 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
Platform.run(new ISafeRunnable() {
|
Platform.run(new ISafeRunnable() {
|
||||||
|
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
//Util.log(exception, "Exception occurred in
|
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.ERROR,
|
||||||
// container initializer: "+initializer);
|
"Exception occurred in container initializer: "+initializer, exception); //$NON-NLS-1$
|
||||||
// //$NON-NLS-1$
|
CCorePlugin.log(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
|
@ -700,9 +702,9 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
storeMap.remove(project);
|
storeMap.remove(project);
|
||||||
store.removePathEntryStoreListener(this);
|
store.removePathEntryStoreListener(this);
|
||||||
}
|
}
|
||||||
|
CModelManager manager = CModelManager.getDefault();
|
||||||
|
ICProject cproject = manager.create(project);
|
||||||
if (project.isAccessible()) {
|
if (project.isAccessible()) {
|
||||||
CModelManager manager = CModelManager.getDefault();
|
|
||||||
ICProject cproject = manager.create(project);
|
|
||||||
try {
|
try {
|
||||||
IPathEntry[] oldResolvedEntries = getResolvedPathEntries(cproject);
|
IPathEntry[] oldResolvedEntries = getResolvedPathEntries(cproject);
|
||||||
// Clear the old cache entries.
|
// Clear the old cache entries.
|
||||||
|
@ -718,6 +720,8 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
}
|
}
|
||||||
} catch (CModelException e) {
|
} catch (CModelException e) {
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
resolvedMap.remove(cproject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -746,6 +750,8 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
IPathEntryStore store = (IPathEntryStore)storeMap.get(project);
|
IPathEntryStore store = (IPathEntryStore)storeMap.get(project);
|
||||||
if (store != null) {
|
if (store != null) {
|
||||||
store.fireClosedEvent(project);
|
store.fireClosedEvent(project);
|
||||||
|
} else {
|
||||||
|
resolvedMap.remove(element.getCProject());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue