mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-21 07:55:24 +02:00
Bug 503012 - CCorePlugin.start method causes Eclipse to become unusable
Change-Id: I73ad83673c2fbe2d232d6e342caa7dc75001b69d
This commit is contained in:
parent
d6d85f394b
commit
c8d528587e
2 changed files with 12 additions and 7 deletions
|
@ -67,10 +67,10 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||||
*/
|
*/
|
||||||
public class CoreModel {
|
public class CoreModel {
|
||||||
private static CoreModel cmodel = null;
|
private static CoreModel cmodel;
|
||||||
private static CModelManager manager = CModelManager.getDefault();
|
private static final CModelManager manager = CModelManager.getDefault();
|
||||||
private static PathEntryManager pathEntryManager = PathEntryManager.getDefault();
|
private static final PathEntryManager pathEntryManager = PathEntryManager.getDefault();
|
||||||
private static CProjectDescriptionManager descriptionManager = CProjectDescriptionManager.getInstance();
|
private static final CProjectDescriptionManager descriptionManager = CProjectDescriptionManager.getInstance();
|
||||||
|
|
||||||
public final static String CORE_MODEL_ID = CCorePlugin.PLUGIN_ID + ".coremodel"; //$NON-NLS-1$
|
public final static String CORE_MODEL_ID = CCorePlugin.PLUGIN_ID + ".coremodel"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
@ -1462,6 +1462,10 @@ public class CoreModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICProjectDescriptionManager getProjectDescriptionManager() {
|
public ICProjectDescriptionManager getProjectDescriptionManager() {
|
||||||
|
if (descriptionManager != null)
|
||||||
return descriptionManager;
|
return descriptionManager;
|
||||||
|
|
||||||
|
// Initialization of the CoreModel hasn't finished yet.
|
||||||
|
return CProjectDescriptionManager.getInstance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -267,7 +267,6 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
|
||||||
synchronized (CProjectDescriptionManager.class) {
|
synchronized (CProjectDescriptionManager.class) {
|
||||||
if (fInstance == null) {
|
if (fInstance == null) {
|
||||||
fInstance = new CProjectDescriptionManager();
|
fInstance = new CProjectDescriptionManager();
|
||||||
fInstance.initProviderInfo();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -342,6 +341,8 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
|
||||||
Job rcJob = new Job(SettingsModelMessages.getString("CProjectDescriptionManager.0")) { //$NON-NLS-1$
|
Job rcJob = new Job(SettingsModelMessages.getString("CProjectDescriptionManager.0")) { //$NON-NLS-1$
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
|
fInstance.initProviderInfo();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
startSaveParticipant();
|
startSaveParticipant();
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue