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:
parent
ca000ab6f5
commit
c188c2200a
2 changed files with 8 additions and 8 deletions
|
@ -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++) {
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue