mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
Call the startup and shutdown methods of the managers
This commit is contained in:
parent
e77cef039e
commit
6b356aa170
1 changed files with 19 additions and 5 deletions
|
@ -52,6 +52,8 @@ public class CCorePlugin extends Plugin {
|
|||
private static ResourceBundle fgResourceBundle;
|
||||
|
||||
private CDescriptorManager fDescriptorManager;
|
||||
private CoreModel fCoreModel;
|
||||
private IndexModel fIndexModel;
|
||||
|
||||
// -------- static methods --------
|
||||
|
||||
|
@ -113,7 +115,15 @@ public class CCorePlugin extends Plugin {
|
|||
*/
|
||||
public void shutdown() throws CoreException {
|
||||
super.shutdown();
|
||||
fDescriptorManager.shutdown();
|
||||
if (fDescriptorManager != null) {
|
||||
fDescriptorManager.shutdown();
|
||||
}
|
||||
if (fIndexModel != null) {
|
||||
fIndexModel.shutdown();
|
||||
}
|
||||
if (fCoreModel != null) {
|
||||
fCoreModel.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -123,9 +133,13 @@ public class CCorePlugin extends Plugin {
|
|||
super.startup();
|
||||
|
||||
// Fired up the model.
|
||||
getCoreModel();
|
||||
fCoreModel = CoreModel.getDefault();
|
||||
fCoreModel.startup();
|
||||
|
||||
// Fired up the indexer. It should delay itself for 10 seconds
|
||||
getIndexModel();
|
||||
fIndexModel = IndexModel.getDefault();
|
||||
fIndexModel.startup();
|
||||
|
||||
fDescriptorManager = new CDescriptorManager();
|
||||
fDescriptorManager.startup();
|
||||
|
||||
|
@ -206,11 +220,11 @@ public class CCorePlugin extends Plugin {
|
|||
}
|
||||
|
||||
public CoreModel getCoreModel() {
|
||||
return CoreModel.getDefault();
|
||||
return fCoreModel;
|
||||
}
|
||||
|
||||
public IndexModel getIndexModel() {
|
||||
return IndexModel.getDefault();
|
||||
return fIndexModel;
|
||||
}
|
||||
|
||||
public ICDescriptor getCProjectDescription(IProject project) throws CoreException {
|
||||
|
|
Loading…
Add table
Reference in a new issue