@Override
 public void addExpression(IASTExpression e) {
   assertNotFrozen();
   if (e != null) {
     exp = ArrayUtil.appendAt(IASTExpression.class, exp, ++expPos, e);
     e.setParent(this);
     e.setPropertyInParent(SUBEXPRESSION);
   }
 }
 @Override
 public final void addDeclaration(IASTDeclaration decl) {
   if (decl != null) {
     decl.setParent(this);
     decl.setPropertyInParent(OWNED_DECLARATION);
     fAllDeclarations =
         ArrayUtil.appendAt(IASTDeclaration.class, fAllDeclarations, ++fLastDeclaration, decl);
     fActiveDeclarations = null;
   }
 }
Ejemplo n.º 3
0
 @Override
 public IBinding[] getDelegates() {
   if (delegates == null) {
     delegates = new IBinding[1];
     int i = 0;
     PDOMCPPUsingDeclaration alias = this;
     try {
       do {
         IBinding delegate = alias.getBinding();
         if (delegate != null) {
           delegates = ArrayUtil.appendAt(IBinding.class, delegates, i++, delegate);
         }
       } while ((alias = alias.getNext()) != null);
     } catch (CoreException e) {
       CCorePlugin.log(e);
     }
     delegates = ArrayUtil.trim(IBinding.class, delegates);
   }
   return delegates;
 }