mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26: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:
parent
371fb48bfe
commit
589f86fdf8
4 changed files with 27 additions and 22 deletions
|
@ -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
|
2005-03-14 Bogdan Gheorghe
|
||||||
Added a NPE check to path entry manager
|
Added a NPE check to path entry manager
|
||||||
|
|
||||||
|
|
|
@ -1542,11 +1542,9 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
IIncludeEntry include = (IIncludeEntry)entry;
|
IIncludeEntry include = (IIncludeEntry)entry;
|
||||||
|
|
||||||
IPath basePath = include.getBasePath();
|
IPath basePath = include.getBasePath();
|
||||||
if (varManager != null)
|
|
||||||
basePath = varManager.resolvePath(basePath);
|
basePath = varManager.resolvePath(basePath);
|
||||||
|
|
||||||
IPath includePath = include.getIncludePath();
|
IPath includePath = include.getIncludePath();
|
||||||
if (varManager != null)
|
|
||||||
includePath = varManager.resolvePath(includePath);
|
includePath = varManager.resolvePath(includePath);
|
||||||
|
|
||||||
return CoreModel.newIncludeEntry(resourcePath, basePath, includePath,
|
return CoreModel.newIncludeEntry(resourcePath, basePath, includePath,
|
||||||
|
|
|
@ -475,15 +475,15 @@
|
||||||
priority="high"/>
|
priority="high"/>
|
||||||
<!-- declares a content type for C header files -->
|
<!-- declares a content type for C header files -->
|
||||||
<content-type id="cHeader" name="%cHeaderName"
|
<content-type id="cHeader" name="%cHeaderName"
|
||||||
base-type="org.eclipse.core.runtime.text"
|
base-type="org.eclipse.cdt.core.cSource"
|
||||||
priority="high"/>
|
priority="high"/>
|
||||||
<!-- declares a content type for C++ source files -->
|
<!-- declares a content type for C++ source files -->
|
||||||
<content-type id="cxxSource" name="%cxxSourceName"
|
<content-type id="cxxSource" name="%cxxSourceName"
|
||||||
base-type="org.eclipse.core.runtime.text"
|
base-type="org.eclipse.cdt.core.cSource"
|
||||||
priority="high"/>
|
priority="high"/>
|
||||||
<!-- declares a content type for C++ header files -->
|
<!-- declares a content type for C++ header files -->
|
||||||
<content-type id="cxxHeader" name="%cxxHeaderName"
|
<content-type id="cxxHeader" name="%cxxHeaderName"
|
||||||
base-type="org.eclipse.core.runtime.text"
|
base-type="org.eclipse.cdt.core.cxxSource"
|
||||||
priority="high"/>
|
priority="high"/>
|
||||||
<!-- declares a content type for ASM Source files -->
|
<!-- declares a content type for ASM Source files -->
|
||||||
<content-type id="asmSource" name="%asmSourceName"
|
<content-type id="asmSource" name="%asmSourceName"
|
||||||
|
@ -491,35 +491,35 @@
|
||||||
priority="high"/>
|
priority="high"/>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<extension point="org.eclipse.core.runtime.contentTypes">
|
<!--extension point="org.eclipse.core.runtime.contentTypes">
|
||||||
<file-association
|
<file-association
|
||||||
content-type="org.eclipse.cdt.core.cSource"
|
content-type="org.eclipse.cdt.core.cSource"
|
||||||
file-extensions="c"/>
|
file-extensions="c"/>
|
||||||
</extension>
|
</extension-->
|
||||||
|
|
||||||
<extension point="org.eclipse.core.runtime.contentTypes">
|
<!--extension point="org.eclipse.core.runtime.contentTypes">
|
||||||
<file-association
|
<file-association
|
||||||
content-type="org.eclipse.cdt.core.cxxSource"
|
content-type="org.eclipse.cdt.core.cxxSource"
|
||||||
file-extensions="cpp,cxx,cc"/>
|
file-extensions="cpp,cxx,cc"/>
|
||||||
</extension>
|
</extension-->
|
||||||
|
|
||||||
<extension point="org.eclipse.core.runtime.contentTypes">
|
<!--extension point="org.eclipse.core.runtime.contentTypes">
|
||||||
<file-association
|
<file-association
|
||||||
content-type="org.eclipse.cdt.core.cxxHeader"
|
content-type="org.eclipse.cdt.core.cxxHeader"
|
||||||
file-extensions="hpp,hh"/>
|
file-extensions="hpp,hh"/>
|
||||||
</extension>
|
</extension-->
|
||||||
|
|
||||||
<extension point="org.eclipse.core.runtime.contentTypes">
|
<!--extension point="org.eclipse.core.runtime.contentTypes">
|
||||||
<file-association
|
<file-association
|
||||||
content-type="org.eclipse.cdt.core.cHeader"
|
content-type="org.eclipse.cdt.core.cHeader"
|
||||||
file-extensions="h"/>
|
file-extensions="h"/>
|
||||||
</extension>
|
</extension-->
|
||||||
|
|
||||||
<extension point="org.eclipse.core.runtime.contentTypes">
|
<!--extension point="org.eclipse.core.runtime.contentTypes">
|
||||||
<file-association
|
<file-association
|
||||||
content-type="org.eclipse.cdt.core.asmSource"
|
content-type="org.eclipse.cdt.core.asmSource"
|
||||||
file-extensions="asm,s"/>
|
file-extensions="asm,s"/>
|
||||||
</extension>
|
</extension-->
|
||||||
|
|
||||||
<!-- =================================================================================== -->
|
<!-- =================================================================================== -->
|
||||||
<!-- Initialize the preference for the Core Plugin -->
|
<!-- Initialize the preference for the Core Plugin -->
|
||||||
|
|
|
@ -236,6 +236,10 @@ public class CCorePlugin extends Plugin {
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
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$
|
cdtLog = new CDTLogWriter(CCorePlugin.getDefault().getStateLocation().append(".log").toFile()); //$NON-NLS-1$
|
||||||
|
|
||||||
//Set debug tracing options
|
//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
|
// Set the default for using the structual parse mode to build the CModel
|
||||||
getPluginPreferences().setDefault(PREF_USE_STRUCTURAL_PARSE_MODE, false);
|
getPluginPreferences().setDefault(PREF_USE_STRUCTURAL_PARSE_MODE, false);
|
||||||
|
|
||||||
// Start file type manager
|
|
||||||
fPathEntryVariableManager = new PathEntryVariableManager();
|
|
||||||
fPathEntryVariableManager.startup();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue