blob: 6e446365fb854b71dfade0cbc03f4a286120c513 [file] [log] [blame]
package org.eclipse.cdt.internal.core.model;
/*
* (c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
*/
import java.util.Map;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.IBinary;
import org.eclipse.cdt.core.model.IBinaryContainer;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
public class BinaryContainer extends Openable implements IBinaryContainer {
public BinaryContainer (CProject cProject) {
super (cProject, null, "Binaries", CElement.C_VCONTAINER);
}
public IBinary[] getBinaries() {
((BinaryContainerInfo)getElementInfo()).sync();
ICElement[] e = getChildren();
IBinary[] b = new IBinary[e.length];
System.arraycopy(e, 0, b, 0, e.length);
return b;
}
public CElementInfo createElementInfo() {
return new BinaryContainerInfo(this);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.model.Openable#generateInfos(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
*/
protected boolean generateInfos(OpenableInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource)
throws CModelException {
// this will bootstrap/start the runner for the project.
CModelManager.getDefault().getBinaryRunner(getCProject());
return true;
}
}