diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog
index ec96f6a7a57..8556f9641ea 100644
--- a/core/org.eclipse.cdt.core/ChangeLog
+++ b/core/org.eclipse.cdt.core/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-14 Alain Magloire
+ Fix NPEs: PathEntryManager should be created first, since it will
+ be use by other components.
+ * model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
+ * src/org/eclipse/cdt/core/CCorePlugin.java
+ * plugin.xml
+
2005-03-14 Bogdan Gheorghe
Added a NPE check to path entry manager
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
index 09f91c9240b..27125083809 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java
@@ -1542,12 +1542,10 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
IIncludeEntry include = (IIncludeEntry)entry;
IPath basePath = include.getBasePath();
- if (varManager != null)
- basePath = varManager.resolvePath(basePath);
+ basePath = varManager.resolvePath(basePath);
IPath includePath = include.getIncludePath();
- if (varManager != null)
- includePath = varManager.resolvePath(includePath);
+ includePath = varManager.resolvePath(includePath);
return CoreModel.newIncludeEntry(resourcePath, basePath, includePath,
include.isSystemInclude(), include.getExclusionPatterns(), include.isExported());
diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml
index e0c5c4adadd..37c883d92b5 100644
--- a/core/org.eclipse.cdt.core/plugin.xml
+++ b/core/org.eclipse.cdt.core/plugin.xml
@@ -475,15 +475,15 @@
priority="high"/>
-
+
-
+
-
+
-
+
-
+
+
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
index cb15ae8ed02..68374cc19cb 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java
@@ -236,6 +236,10 @@ public class CCorePlugin extends Plugin {
public void start(BundleContext context) throws Exception {
super.start(context);
+ // Start file type manager first !!
+ fPathEntryVariableManager = new PathEntryVariableManager();
+ fPathEntryVariableManager.startup();
+
cdtLog = new CDTLogWriter(CCorePlugin.getDefault().getStateLocation().append(".log").toFile()); //$NON-NLS-1$
//Set debug tracing options
@@ -253,10 +257,6 @@ public class CCorePlugin extends Plugin {
// Set the default for using the structual parse mode to build the CModel
getPluginPreferences().setDefault(PREF_USE_STRUCTURAL_PARSE_MODE, false);
- // Start file type manager
- fPathEntryVariableManager = new PathEntryVariableManager();
- fPathEntryVariableManager.startup();
-
}