Example usage for org.eclipse.jdt.internal.core OpenableElementInfo getChildren

List of usage examples for org.eclipse.jdt.internal.core OpenableElementInfo getChildren

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core OpenableElementInfo getChildren.

Prototype

@Override
    public IJavaElement[] getChildren() 

Source Link

Usage

From source file:org.eclipse.ajdt.core.javaelements.AJCompilationUnitManager.java

License:Open Source License

public boolean ensureUnitIsInModel(AJCompilationUnit unit) throws JavaModelException {
    //ensure unit is in the model
    OpenableElementInfo info = (OpenableElementInfo) ((JavaElement) unit.getParent()).getElementInfo();
    IJavaElement[] elems = info.getChildren();
    for (int i = 0; i < elems.length; i++) {
        IJavaElement element = elems[i];
        if (element == unit)
            return true;
    }/* w w w  . j a  v  a 2s  .co  m*/
    info.addChild(unit);
    return false;
}