Пример #1
0
  protected IScope scope_Binding_toItf(Binding binding, EReference ref) {
    final List<Interface> toItfs = new ArrayList<Interface>();
    SubComponent toSubComp = binding.getToSubComp();
    if (toSubComp == null) {
      // from 'this'
      Definition d = (Definition) binding.eContainer();
      toItfs.addAll(AdlModelHelper.getAllClientInterfaces(d, true));
      toItfs.addAll(AdlModelHelper.getAllOutputInterfaces(d, true));
    } else {
      toItfs.addAll(AdlModelHelper.getAllServerInterfaces(toSubComp, true));
      toItfs.addAll(AdlModelHelper.getAllInputInterfaces(toSubComp, true));
    }

    return new BindingItfScope(toItfs);
  }
Пример #2
0
 protected IScope scope_Binding_toSubComp(Binding binding, EReference ref) {
   final List<SubComponent> subComps = new ArrayList<SubComponent>();
   Definition d = (Definition) binding.eContainer();
   subComps.addAll(AdlModelHelper.getAllSubComponents(d, true));
   return new BindingSubCompScope(subComps);
 }