1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-21 07:05:58 +02:00

Restart the BinaryRunner when changing the BinaryParser

This commit is contained in:
Alain Magloire 2004-03-04 03:00:31 +00:00
parent 4eab4a897e
commit 0c59594c73
2 changed files with 17 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2004-03-03 Alain Magloire
When changing the BinaryParser the BinaryRunners
were not restarted.
* model/org/eclipse/cdt/iternal/core/model/CModelManager.java
2004-03-03 Alain Magloire 2004-03-03 Alain Magloire
From Sean Sevoy. Fix to VCErrorParser.java From Sean Sevoy. Fix to VCErrorParser.java

View file

@ -316,7 +316,7 @@ public class CModelManager implements IResourceChangeListener {
registerCModelDelta(delta); registerCModelDelta(delta);
} else if (type == ICElement.C_BINARY) { } else if (type == ICElement.C_BINARY) {
if (! ((IBinary)celement).isObject()) { if (! ((IBinary)celement).isObject()) {
//System.out.println("RELEASE Binary " + cfile.getElementName()); System.out.println("RELEASE Binary " + celement.getElementName());
CProject cproj = (CProject)celement.getCProject(); CProject cproj = (CProject)celement.getCProject();
BinaryContainer container = (BinaryContainer)cproj.getBinaryContainer(); BinaryContainer container = (BinaryContainer)cproj.getBinaryContainer();
container.removeChild(celement); container.removeChild(celement);
@ -327,7 +327,7 @@ public class CModelManager implements IResourceChangeListener {
} }
if (celement instanceof IParent) { if (celement instanceof IParent) {
if ( peekAtInfo(celement) != null ) { if (peekAtInfo(celement) != null) {
CElementInfo info = ((CElement)celement).getElementInfo(); CElementInfo info = ((CElement)celement).getElementInfo();
if (info != null) { if (info != null) {
ICElement[] children = info.getChildren(); ICElement[] children = info.getChildren();
@ -344,14 +344,21 @@ public class CModelManager implements IResourceChangeListener {
if (pinfo.vLib != null) { if (pinfo.vLib != null) {
releaseCElement(pinfo.vLib); releaseCElement(pinfo.vLib);
} }
IProject project = celement.getCProject().getProject();
BinaryRunner runner = (BinaryRunner) binaryRunners.remove(project);
if (runner != null) {
runner.stop();
}
} }
} }
} else { } else {
// If an entire folder was deleted we need to update the
// BinaryContainer/ArchiveContainer also.
ICProject cproject = celement.getCProject(); ICProject cproject = celement.getCProject();
CProjectInfo info = (CProjectInfo)peekAtInfo(cproject); CProjectInfo info = (CProjectInfo)peekAtInfo(cproject);
if (info != null && info.vBin != null) { if (info != null && info.vBin != null) {
if (peekAtInfo(info.vBin) != null) { if (peekAtInfo(info.vBin) != null) {
ICElement[] bins = info.getChildren(); ICElement[] bins = info.vBin.getChildren();
for (int i = 0; i < bins.length; i++) { for (int i = 0; i < bins.length; i++) {
if (celement.getPath().isPrefixOf(bins[i].getPath())) { if (celement.getPath().isPrefixOf(bins[i].getPath())) {
CElementDelta delta = new CElementDelta(getCModel()); CElementDelta delta = new CElementDelta(getCModel());