Add LayoutExternalPort for interface
492152
def addPort(n: LNode, intf: Interface):
    
    d = PortTypeFromDir(intf._direction)
    ext_p = LayoutExternalPort(
        n, name=intf._name, direction=d, node2lnode=n._node2lnode)
    ext_p.originObj = originObjOfPort(intf)
    n.children.append(ext_p)
    addPortToLNode(ext_p, intf, reverseDirection=True)
    return ext_p
368502
private void addEntryTableToLayout(
        List<CmsAccessControlEntry> entries,
        VerticalLayout layout,
        boolean editable,
        boolean inheritedRes) {

        final CmsPermissionViewTable table = new CmsPermissionViewTable(
            m_cms,
            entries,
            editable,
            inheritedRes,
            m_parents,
            this);
        HorizontalLayout hl = new HorizontalLayout();
        Label label = new Label(
            CmsVaadinUtils.getMessageText(
                Messages.GUI_PERMISSION_COUNT_1,
                new Integer(table.getContainerDataSource().size())));
        label.addStyleName("o-report");
        hl.addComponent(label);
        TextField tableFilter = new TextField();
        tableFilter.setIcon(FontOpenCms.FILTER);
        tableFilter.setInputPrompt(CmsVaadinUtils.getMessageText(org.opencms.ui.apps.Messages.GUI_EXPLORER_FILTER_0));
        tableFilter.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
        tableFilter.setWidth("200px");
        tableFilter.addTextChangeListener(new TextChangeListener() {

            private static final long serialVersionUID = 1L;

            public void textChange(TextChangeEvent event) {

                table.filterTable(event.getText());
            }
        });
        hl.addComponent(tableFilter);
        hl.setWidth("100%");
        hl.setExpandRatio(label, 1);
        hl.setMargin(true);
        hl.setComponentAlignment(tableFilter, com.vaadin.ui.Alignment.MIDDLE_RIGHT);
        if (table.getContainerDataSource().size() == 0) {
            layout.addComponent(CmsVaadinUtils.getInfoLayout(Messages.GUI_PERMISSION_EMPTY_0));
        } else {
            layout.addComponent(hl);
            layout.addComponent(table);
            CmsVaadinUtils.centerWindow(this);
        }
    }
790448
def _set_boutons_interface(self, buttons):
        """"""
        for id_action, f, d, is_active in buttons:
            icon = self.get_icon(id_action)
            action = self.addAction(QIcon(icon), d)
            action.setEnabled(is_active)
            action.triggered.connect(f)
568289
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        m_resources = null;
        BasePanel myParentScreen = parentScreen;
        while ((!(myParentScreen instanceof AppletScreen)) && (myParentScreen != null))
            myParentScreen = myParentScreen.getParentScreen();      // Always add toolbars to AppletScreen
        if (myParentScreen == null)
            myParentScreen = parentScreen;  // Only in HTML screens

        super.init(itsLocation, myParentScreen, fieldConverter, iDisplayFieldDesc, properties);
    }
575585
def add_layout(self, layout):
        
        layout.register_frame(self)
        self._layouts.append(layout)
966928
def quartus_add_interface_port(self, buff: List[str], intfName: str, signal,
                                   logicName: str, packager: "IpCorePackager"):
        
        d = signal._direction
        if d == INTF_DIRECTION.MASTER:
            dir_ = "Output"
        elif d == INTF_DIRECTION.SLAVE:
            dir_ = "Input"
        else:
            raise ValueError(d)

        _, width, _ = packager.getTypeWidth(packager.getInterfaceType(signal), do_eval=True)

        buff.append("add_interface_port %s %s %s %s %s" % (
            intfName,
            packager.getInterfacePhysicalName(signal),
            logicName,
            dir_,
            width
        ))
712171
public void addInterface(Class<?> ifc) {

        LettuceAssert.notNull(ifc, "Interface type must not be null");
        LettuceAssert.isTrue(ifc.isInterface(), "Type must be an interface");

        this.interfaces.add(ifc);
    }
506255
public Panel addComponent(Component component, LayoutData layoutData) {
        if(component != null) {
            component.setLayoutData(layoutData);
            addComponent(component);
        }
        return this;
    }
1329651
def init_layout(self):
        
        parent = self.parent()
        if parent is not None:
            self.adapter = parent.adapter
            self.adapter.addFragment(self.fragment)
927376
def _add_interface(self, interface_id, **kw):
        
        base_interface = ElementCache()

        base_interface.update(
            interface_id=str(interface_id),
            interfaces=[])
        
        if 'zone_ref' in kw:
            zone_ref = kw.pop('zone_ref')
            base_interface.update(zone_ref=zone_helper(zone_ref) if zone_ref else None)
                
        if 'comment' in kw:
            base_interface.update(comment=kw.pop('comment'))
            
        self.data = base_interface
                          
        interfaces = kw.pop('interfaces', [])
        if interfaces:
            for interface in interfaces:
                if interface.get('cluster_virtual', None) or \
                    len(interface.get('nodes', [])) > 1:    # Cluster
                    
                    kw.update(interface_id=interface_id, interfaces=interfaces)
                    cvi = ClusterPhysicalInterface(**kw)
                    cvi.data.pop('vlanInterfaces', None)
                    self.data.update(cvi.data)
                else:
                    # Single interface FW
                    for node in interface.get('nodes', []):
                        node.update(nodeid=1)
                        sni = SingleNodeInterface.create(interface_id, **node)
                        base_interface.setdefault('interfaces', []).append(
                            {sni.typeof: sni.data})
433078
def set_layout(wlayout, callback):
    ''''''
    global display_size
    global window_list
    global loaded_layout
    global pending_load
    global vehiclename
    #if not wlayout.name in window_list:
    #    print("layout %s" % wlayout)
    if not wlayout.name in window_list and loaded_layout is not None and wlayout.name in loaded_layout:
        callback(loaded_layout[wlayout.name])
    window_list[wlayout.name] = ManagedWindow(wlayout, callback)
    display_size = wlayout.dsize
    if pending_load:
        pending_load = False
        load_layout(vehiclename)
563537
function addExportToModule(source, modulePath, classifiedName, importPath) {
    return addSymbolToNgModuleMetadata(source, modulePath, 'exports', classifiedName, importPath);
}
1250281
def add_widget(self, w):
        """"""
        if self.layout():
            self.layout().addWidget(w)
        else:
            layout = QVBoxLayout(self)
            layout.addWidget(w)
768262
function instantiateImports(
  n: Module,
  allocator: Allocator,
  externalElements: Object,
  internals: Object,
  moduleInstance: ModuleInstance
) {
  function getExternalElementOrThrow(key: string, key2: string): any {
    if (
      typeof externalElements[key] === "undefined" ||
      typeof externalElements[key][key2] === "undefined"
    ) {
      throw new CompileError(`Unknown import ${key}.${key2}`);
    }

    return externalElements[key][key2];
  }

  function handleFuncImport(node: ModuleImport, descr: FuncImportDescr) {
    const element = getExternalElementOrThrow(node.module, node.name);

    const params = descr.signature.params != null ? descr.signature.params : [];
    const results =
      descr.signature.results != null ? descr.signature.results : [];

    const externFuncinstance = externvalue.createFuncInstance(
      element,
      // $FlowIgnore
      params,
      results
    );

    const externFuncinstanceAddr = allocator.malloc(
      1 /* sizeof externFuncinstance */
    );
    allocator.set(externFuncinstanceAddr, externFuncinstance);

    moduleInstance.funcaddrs.push(externFuncinstanceAddr);
  }

  function handleGlobalImport(node: ModuleImport, descr: GlobalType) {
    const element = getExternalElementOrThrow(node.module, node.name);

    const externglobalinstance = externvalue.createGlobalInstance(
      new i32(element),
      descr.valtype,
      descr.mutability
    );

    const addr = allocator.malloc(1 /* size of the globalinstance struct */);
    allocator.set(addr, externglobalinstance);

    moduleInstance.globaladdrs.push(addr);
  }

  function handleMemoryImport(node: ModuleImport) {
    const memoryinstance = getExternalElementOrThrow(node.module, node.name);

    const addr = allocator.malloc(1 /* size of the memoryinstance struct */);
    allocator.set(addr, memoryinstance);

    moduleInstance.memaddrs.push(addr);
  }

  function handleTableImport(node: ModuleImport) {
    const tableinstance = getExternalElementOrThrow(node.module, node.name);

    const addr = allocator.malloc(1 /* size of the tableinstance struct */);
    allocator.set(addr, tableinstance);

    moduleInstance.tableaddrs.push(addr);
  }

  traverse(n, {
    ModuleImport({ node }: NodePath<ModuleImport>) {
      switch (node.descr.type) {
        case "FuncImportDescr":
          return handleFuncImport(node, node.descr);
        case "GlobalType":
          return handleGlobalImport(node, node.descr);
        case "Memory":
          return handleMemoryImport(node);
        case "Table":
          return handleTableImport(node);
        default:
          throw new Error("Unsupported import of type: " + node.descr.type);
      }
    }
  });
}
913222
def set_interface(self, interface):
        """"""
        self.interface = interface
        self.interface.callbacks.update_toolbar = self._update
        self._update()
1057010
static void addExtern(AbstractCompiler compiler) {
    Node name = IR.name(PROTECTOR_FN);
    name.putBooleanProp(Node.IS_CONSTANT_NAME, true);
    Node var = IR.var(name);
    JSDocInfoBuilder builder = new JSDocInfoBuilder(false);
    var.setJSDocInfo(builder.build());
    CompilerInput input = compiler.getSynthesizedExternsInput();
    Node root = input.getAstRoot(compiler);
    name.setStaticSourceFileFrom(root);
    var.setStaticSourceFileFrom(root);
    root.addChildToBack(var);
    compiler.reportChangeToEnclosingScope(var);
  }
773841
public static TSInterfaceType getNestedInterface(TSType type, String name, boolean create) {
		TSModule module = getNestedTypeContainer(type, create);
		if (module == null && !create) {
			return null;
		} else if (module == null) {
			throw new IllegalStateException("cannot setup interface as no parent container is available");
		}

		for (TSElement element : module.getElements()) {
			if (element instanceof TSInterfaceType && ((TSInterfaceType) element).getName().equals(name)) {
				return (TSInterfaceType) element;
			}
		}
		if (create) {
			TSInterfaceType interfaceType = new TSInterfaceType();
			interfaceType.setExported(true);
			interfaceType.setName(name);
			interfaceType.setParent(module);
			module.getElements().add(interfaceType);
			return interfaceType;
		} else {
			return null;
		}
	}