mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-21 23:33:57 +02:00
When doing ther reset of the binary parser,
recreate the project.
This commit is contained in:
parent
b046eac006
commit
25d400816f
1 changed files with 11 additions and 7 deletions
|
@ -46,12 +46,12 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
|
||||||
public class CModelManager implements IResourceChangeListener {
|
public class CModelManager implements IResourceChangeListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unique handle onto the CModel
|
* Unique handle onto the CModel
|
||||||
*/
|
*/
|
||||||
final CModel cModel = new 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.
|
* Used to convert <code>IResourceDelta</code>s into <code>ICElementDelta</code>s.
|
||||||
|
@ -356,7 +356,11 @@ public class CModelManager implements IResourceChangeListener {
|
||||||
if (project != null) {
|
if (project != null) {
|
||||||
ICElement celement = create(project);
|
ICElement celement = create(project);
|
||||||
if (celement != null) {
|
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);
|
releaseCElement(celement);
|
||||||
|
celement = create(project);
|
||||||
// Fired and ICElementDelta.PARSER_CHANGED
|
// Fired and ICElementDelta.PARSER_CHANGED
|
||||||
CElementDelta delta = new CElementDelta(getCModel());
|
CElementDelta delta = new CElementDelta(getCModel());
|
||||||
delta.binaryParserChanged(celement);
|
delta.binaryParserChanged(celement);
|
||||||
|
@ -554,8 +558,8 @@ public class CModelManager implements IResourceChangeListener {
|
||||||
case IResourceChangeEvent.PRE_DELETE :
|
case IResourceChangeEvent.PRE_DELETE :
|
||||||
try{
|
try{
|
||||||
if (resource.getType() == IResource.PROJECT &&
|
if (resource.getType() == IResource.PROJECT &&
|
||||||
( ((IProject)resource).hasNature(CProjectNature.C_NATURE_ID) ||
|
( ((IProject)resource).hasNature(CProjectNature.C_NATURE_ID) ||
|
||||||
((IProject)resource).hasNature(CCProjectNature.CC_NATURE_ID) )){
|
((IProject)resource).hasNature(CCProjectNature.CC_NATURE_ID) )){
|
||||||
this.deleting((IProject) resource);}
|
this.deleting((IProject) resource);}
|
||||||
}catch (CoreException e){
|
}catch (CoreException e){
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue