1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

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
This commit is contained in:
Alain Magloire 2005-03-15 19:55:34 +00:00
parent 371fb48bfe
commit 589f86fdf8
4 changed files with 27 additions and 22 deletions

View file

@ -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

View file

@ -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());

View file

@ -475,15 +475,15 @@
priority="high"/>
<!-- declares a content type for C header files -->
<content-type id="cHeader" name="%cHeaderName"
base-type="org.eclipse.core.runtime.text"
base-type="org.eclipse.cdt.core.cSource"
priority="high"/>
<!-- declares a content type for C++ source files -->
<content-type id="cxxSource" name="%cxxSourceName"
base-type="org.eclipse.core.runtime.text"
base-type="org.eclipse.cdt.core.cSource"
priority="high"/>
<!-- declares a content type for C++ header files -->
<content-type id="cxxHeader" name="%cxxHeaderName"
base-type="org.eclipse.core.runtime.text"
base-type="org.eclipse.cdt.core.cxxSource"
priority="high"/>
<!-- declares a content type for ASM Source files -->
<content-type id="asmSource" name="%asmSourceName"
@ -491,36 +491,36 @@
priority="high"/>
</extension>
<extension point="org.eclipse.core.runtime.contentTypes">
<!--extension point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.cdt.core.cSource"
file-extensions="c"/>
</extension>
</extension-->
<extension point="org.eclipse.core.runtime.contentTypes">
<!--extension point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.cdt.core.cxxSource"
file-extensions="cpp,cxx,cc"/>
</extension>
</extension-->
<extension point="org.eclipse.core.runtime.contentTypes">
<!--extension point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.cdt.core.cxxHeader"
file-extensions="hpp,hh"/>
</extension>
</extension-->
<extension point="org.eclipse.core.runtime.contentTypes">
<!--extension point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.cdt.core.cHeader"
file-extensions="h"/>
</extension>
</extension-->
<extension point="org.eclipse.core.runtime.contentTypes">
<!--extension point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.cdt.core.asmSource"
file-extensions="asm,s"/>
</extension>
</extension-->
<!-- =================================================================================== -->
<!-- Initialize the preference for the Core Plugin -->
<!-- =================================================================================== -->

View file

@ -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();
}