diff options
author | Alain Magloire | 2003-10-29 16:39:34 +0000 |
---|---|---|
committer | Alain Magloire | 2003-10-29 16:39:34 +0000 |
commit | 25d400816fd288324c0a9b53bb132e7a9bd1770f (patch) | |
tree | ba4a61b5b1b4f72872dd41ea068a60d652ba7242 | |
parent | b046eac006b1ce1cb5e20feb212810176c302805 (diff) | |
download | org.eclipse.cdt-25d400816fd288324c0a9b53bb132e7a9bd1770f.tar.gz org.eclipse.cdt-25d400816fd288324c0a9b53bb132e7a9bd1770f.tar.xz org.eclipse.cdt-25d400816fd288324c0a9b53bb132e7a9bd1770f.zip |
When doing ther reset of the binary parser,
recreate the project.
-rw-r--r-- | core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java index 13e067a8e6a..93711a9556d 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java @@ -46,12 +46,12 @@ import org.eclipse.core.runtime.IProgressMonitor; public class CModelManager implements IResourceChangeListener { - /** - * Unique handle onto the CModel - */ - final CModel cModel = new CModel(); + /** + * Unique handle onto the CModel + */ + final CModel cModel = new CModel(); - public static HashSet OptionNames = new HashSet(20); + public static HashSet OptionNames = new HashSet(20); /** * Used to convert <code>IResourceDelta</code>s into <code>ICElementDelta</code>s. @@ -356,7 +356,11 @@ public class CModelManager implements IResourceChangeListener { if (project != null) { ICElement celement = create(project); if (celement != null) { + // Let the function remove the children + // but it has the side of effect of removing the CProject also + // so we have to recall create again. releaseCElement(celement); + celement = create(project); // Fired and ICElementDelta.PARSER_CHANGED CElementDelta delta = new CElementDelta(getCModel()); delta.binaryParserChanged(celement); @@ -554,8 +558,8 @@ public class CModelManager implements IResourceChangeListener { case IResourceChangeEvent.PRE_DELETE : try{ if (resource.getType() == IResource.PROJECT && - ( ((IProject)resource).hasNature(CProjectNature.C_NATURE_ID) || - ((IProject)resource).hasNature(CCProjectNature.CC_NATURE_ID) )){ + ( ((IProject)resource).hasNature(CProjectNature.C_NATURE_ID) || + ((IProject)resource).hasNature(CCProjectNature.CC_NATURE_ID) )){ this.deleting((IProject) resource);} }catch (CoreException e){ } |