add chain to view
508244
function(chain, recurse) {
    var chainView = new ChainView(this, chain.full());
    this._chains.push(chainView);
    if (recurse) {
      var residues = chain.residues();
      for (var i = 0; i< residues.length; ++i) {
        chainView.addResidue(residues[i], true);
      }
    }
    return chainView;
  }
989958
public void addView(Category category, CategoryView view, CategoryPresenter presenter) {
    views.put(category, view);
    presenters.put(category, presenter);
  }
739188
public static void displayChains(TraceComponent logger, ChainData[] chains,
                                     String message, String prefix) {
        if (!logger.isDebugEnabled()) {
            return;
        }
        if (chains == null || chains.length == 0) {
            chTrace.debugTrace(logger, prefix + ", no chains to trace (" + message + ")");
        } else {
            chTrace.traceChains(logger, Arrays.asList(chains), message, prefix);
        }
    }
222007
function(view)
	{
		if (arguments.length > 1)
		{
			conbo.forEach(arguments, function(view, index, list) 
			{
				this.prependView(view);
			}, 
			this);
			
			return this;
		}
	
		if (typeof view === 'function')
		{
			view = new view(this.context);
		}
		
		if (!(view instanceof conbo.View))
		{
			throw new Error('Parameter must be conbo.View class or instance of it');
		}
		
		var firstChild = this.body.firstChild;
		
		firstChild
			? this.body.insertBefore(view.el, firstChild)
			: this.appendView(view);
		
		return this;
	}
551977
function View(view, options) {
  this.history = [];
  Item.call(this, view, options);
  this.init(view);
  return view;
}
662995
function Chain() {
    this.props = {}
    this.state = {}

    this.props._context = this
    this.props._data = {}
    this.props._nodes = new LinkNodes()
    this.props._finals =[]
}
1311748
function (token, context, chain) {

			var i ,
				len ,
				files = [] ,
				output = '' ,
				viewData = Object.create(context) ,
				env = container.getParameter('kernel.environment') ,
				data = container.get('assets.template.helper.assets')
								.assets(token.files[0], token.files[1], token.files[2], false);

			if (env === 'development') {

				// dev environments print all of the files one-by-one
				data.files.forEach(function(file) {
					files.push(file + '?' + data.versionParameter + '=' + data.version);
				});

			} else {

				// prod or test print the combined file only
				files = [data.combinedFile];

			}

			// render the output one file at a time, respectively injecting URL into each
			for (i = 0, len = files.length; i < len; i++) {
				viewData.url = files[i];
				output += Twig.parse.apply(this, [token.output, viewData]);
			}

			return {
				chain: chain,
				output: output
			};
		}
888500
def populateViewTree(self, view):
        '''
        
        '''

        vuid = view.getUniqueId()
        text = view.__smallStr__()
        if view.getParent() is None:
            self.viewTree.insert('', Tkinter.END, vuid, text=text)
        else:
            self.viewTree.insert(view.getParent().getUniqueId(), Tkinter.END, vuid, text=text, tags=('ttk'))
            self.viewTree.set(vuid, 'T', '*' if view.isTarget() else ' ')
            self.viewTree.tag_bind('ttk', '<1>', self.viewTreeItemClicked)
471336
def add_view(self,
                 view,
                 name=None,
                 position=None,
                 closable=False,
                 floatable=True,
                 floating=None):
        """"""

        # Set the name in the view.
        view.view_index = self._get_view_index(view)
        # The view name is `<class_name><view_index>`, e.g. `MyView0`.
        view.name = name or view.__class__.__name__ + str(view.view_index)

        # Get the Qt canvas for VisPy and matplotlib views.
        widget = _try_get_vispy_canvas(view)
        widget = _try_get_matplotlib_canvas(widget)

        dock_widget = _create_dock_widget(widget, view.name,
                                          closable=closable,
                                          floatable=floatable,
                                          )
        self.addDockWidget(_get_dock_position(position), dock_widget)
        if floating is not None:
            dock_widget.setFloating(floating)
        dock_widget.view = view

        # Emit the close_view event when the dock widget is closed.
        @dock_widget.connect_
        def on_close_widget():
            self.emit('close_view', view)

        dock_widget.show()
        self.emit('add_view', view)
        logger.log(5, "Add %s to GUI.", view.name)
        return dock_widget
709673
def add_chain_info(data_api, data_setters, chain_index):
    """"""
    chain_id = data_api.chain_id_list[chain_index]
    chain_name = data_api.chain_name_list[chain_index]
    num_groups = data_api.groups_per_chain[chain_index]
    data_setters.set_chain_info(chain_id, chain_name, num_groups)
    next_ind = data_api.group_counter + num_groups
    last_ind = data_api.group_counter
    for group_ind in range(last_ind, next_ind):
        add_group(data_api, data_setters, group_ind)
        data_api.group_counter +=1
    data_api.chain_counter+=1
973563
public function addView()
    {
        $view = View::create([
            'link_id'           => $this->id,
            'language'          => Identify::lang()->getLanguage(),
            'browser'           => Identify::browser()->getName(),
            'browser_version'   => Identify::browser()->getVersion(),
            'os'                => Identify::os()->getName(),
            'os_version'        => Identify::os()->getVersion(),
            'ip'                => $this->getIP(),
        ]);
    }
595273
def _load_chains(f):
        '''
        
        '''
        chains = []
        while True:
            line = f.readline()
            if not line:
                break
            if line.startswith(b'#') or line.startswith(b'\n') or line.startswith(b'\r'):
                continue
            if line.startswith(b'chain'):
                # Read chain
                chains.append(LiftOverChain(line, f))
                continue
        return chains
1137881
def add_atomic_information(data_api, data_setters):
    """"""
    for model_chains in data_api.chains_per_model:
        data_setters.set_model_info(data_api.model_counter, model_chains)
        tot_chains_this_model = data_api.chain_counter + model_chains
        last_chain_counter = data_api.chain_counter
        for chain_index in range(last_chain_counter, tot_chains_this_model):
            add_chain_info(data_api, data_setters, chain_index)
        data_api.model_counter+=1
283054
def register_view(self, view):
        """"""
        self.view.set_text(self.model.credits)
        gobject.timeout_add(1500, self.on_begin_scroll)
        return
394339
function(chain) {
    // Some attempt is made to prevent the cursor from jumping
    // randomly when an undo or redo happens. It still behaves a bit
    // strange sometimes.
    var cursor = select.cursorPos(this.container, false), self = this;

    // Remove all nodes in the DOM tree between from and to (null for
    // start/end of container).
    function removeRange(from, to) {
      var pos = from ? from.nextSibling : self.container.firstChild;
      while (pos != to) {
        var temp = pos.nextSibling;
        removeElement(pos);
        pos = temp;
      }
    }

    var start = chain[0].from, end = chain[chain.length - 1].to;
    // Clear the space where this change has to be made.
    removeRange(start, end);

    // Insert the content specified by the chain into the DOM tree.
    for (var i = 0; i < chain.length; i++) {
      var line = chain[i];
      // The start and end of the space are already correct, but BR
      // tags inside it have to be put back.
      if (i > 0)
        self.container.insertBefore(line.from, end);

      // Add the text.
      var node = makePartSpan(fixSpaces(line.text), this.container.ownerDocument);
      self.container.insertBefore(node, end);
      // See if the cursor was on this line. Put it back, adjusting
      // for changed line length, if it was.
      if (cursor && cursor.node == line.from) {
        var cursordiff = 0;
        var prev = this.after(line.from);
        if (prev && i == chain.length - 1) {
          // Only adjust if the cursor is after the unchanged part of
          // the line.
          for (var match = 0; match < cursor.offset &&
               line.text.charAt(match) == prev.text.charAt(match); match++);
          if (cursor.offset > match)
            cursordiff = line.text.length - prev.text.length;
        }
        select.setCursorPos(this.container, {node: line.from, offset: Math.max(0, cursor.offset + cursordiff)});
      }
      // Cursor was in removed line, this is last new line.
      else if (cursor && (i == chain.length - 1) && cursor.node && cursor.node.parentNode != this.container) {
        select.setCursorPos(this.container, {node: line.from, offset: line.text.length});
      }
    }

    // Anchor the chain in the DOM tree.
    this.linkChain(chain);
    return start;
  }
452196
function Views(options) {
  Collection.call(this, options);
  this.options.collection = this.options.collection || this;
  this.define('View', this.options.View || require('./view'));
  this.define('Item', this.View);
}
921829
def append!(view_or_constant, style=nil, opts = {}, &block)
      opts[:raw_block] = block if block
      append(view_or_constant, style, opts).get
    end