1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 23:05:47 +02:00

PR 131165

getBinaries() could return an empty list.
This commit is contained in:
Alain Magloire 2006-12-17 22:24:45 +00:00
parent ca000ab6f5
commit c188c2200a
2 changed files with 8 additions and 8 deletions

View file

@ -27,8 +27,15 @@ public class BinaryContainer extends Openable implements IBinaryContainer {
super (cProject, null, CCorePlugin.getResourceString("CoreModel.BinaryContainer.Binaries"), ICElement.C_VCONTAINER); //$NON-NLS-1$
}
synchronized void sync() {
BinaryRunner runner = CModelManager.getDefault().getBinaryRunner(getCProject());
if (runner != null) {
runner.waitIfRunning();
}
}
public IBinary[] getBinaries() throws CModelException {
((BinaryContainerInfo)getElementInfo()).sync();
sync();
ICElement[] e = getChildren();
ArrayList list = new ArrayList(e.length);
for (int i = 0; i < e.length; i++) {

View file

@ -25,13 +25,6 @@ public class BinaryContainerInfo extends OpenableInfo {
super(element);
}
synchronized void sync() {
BinaryRunner runner = CModelManager.getDefault().getBinaryRunner(getElement().getCProject());
if (runner != null) {
runner.waitIfRunning();
}
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.model.CElementInfo#addChild(org.eclipse.cdt.core.model.ICElement)
*/