mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
handle case when initializer extension is missconfigured.
This commit is contained in:
parent
5cdf8ec7ff
commit
c4db17aa34
1 changed files with 5 additions and 5 deletions
|
@ -566,8 +566,8 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
if (runInitializer) {
|
if (runInitializer) {
|
||||||
// remove the lock.
|
// remove the lock.
|
||||||
final PathEntryContainerInitializer initializer = getPathEntryContainerInitializer(containerPath.segment(0));
|
final PathEntryContainerInitializer initializer = getPathEntryContainerInitializer(containerPath.segment(0));
|
||||||
|
final boolean[] ok = {false};
|
||||||
if (initializer != null) {
|
if (initializer != null) {
|
||||||
final boolean[] ok = {true};
|
|
||||||
// wrap initializer call with Safe runnable in case
|
// wrap initializer call with Safe runnable in case
|
||||||
// initializer would be
|
// initializer would be
|
||||||
// causing some grief
|
// causing some grief
|
||||||
|
@ -577,16 +577,16 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.ERROR,
|
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.ERROR,
|
||||||
"Exception occurred in container initializer: "+initializer, exception); //$NON-NLS-1$
|
"Exception occurred in container initializer: "+initializer, exception); //$NON-NLS-1$
|
||||||
CCorePlugin.log(status);
|
CCorePlugin.log(status);
|
||||||
ok[0] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
initializer.initialize(containerPath, project);
|
initializer.initialize(containerPath, project);
|
||||||
|
ok[0] = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!ok[0]) {
|
}
|
||||||
containerPut(project, containerPath, null); // flush and notify
|
if (!ok[0]) {
|
||||||
}
|
containerPut(project, containerPath, null); // flush and notify
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// retrieve new value
|
// retrieve new value
|
||||||
|
|
Loading…
Add table
Reference in a new issue