<commit_before>/**
 * 
 */
package org.pentaho.ui.xul;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.dom4j.Document;
import org.pentaho.ui.xul.containers.XulWindow;

/**
 * @author OEM
 *
 */
public class XulWindowContainer {
  private List<XulWindow> windows;
  private Document document;
  
  private Map<String, XulEventHandler> eventHandlers;
  
  public XulWindowContainer(){
    windows = new ArrayList<XulWindow>();
    eventHandlers = new HashMap<String, XulEventHandler>();
  }

  public Document getDocumentRoot(){
    return this.document;
  }

  public void setDocumentRoot(Document document){
    this.document = document;
  }
  
  public Document remoteCall(XulServiceCall serviceUrl){
    return null;
  }
  
  public XulComponent getElementById(String id){
    return (XulComponent) document.elementByID(id);
  }
  <commit_msg>Multiple Windows per XulWindowContainer. All windows share event handler instances.<commit_after>/**
 * 
 */
package org.pentaho.ui.xul;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.dom4j.Document;
import org.pentaho.ui.xul.containers.XulWindow;

/**
 * @author OEM
 *
 */
public class XulWindowContainer {
  private List<XulWindow> windows;
  private List<Document> documents;
  
  private Map<String, XulEventHandler> eventHandlers;
  
  public XulWindowContainer(){
    windows = new ArrayList<XulWindow>();
    documents = new ArrayList<Document>();
    eventHandlers = new HashMap<String, XulEventHandler>();
  }

  public Document getDocumentRoot(){
    return this.documents.get(0);
  }

  public void addDocument(Document document){
    this.documents.add(document);
  }
  
  public Document remoteCall(XulServiceCall serviceUrl){
    return null;
  }
  
  
{'fraction_non_alphanumeric': 0.10700706137968495, 'fraction_numerical': 0.0016295491580662683, 'mean_word_length': 4.13091922005571, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5317168', 'n_tokens_mistral': 571, 'n_tokens_neox': 568, 'n_words': 130}