anchor.diff:    }
   }
   
  -class ConfigSectionMatcher {
  +Future<ConfigContainerContext> getConfigContext(workspace.Container container) {
  +  ConfigContainerContext matcher = new ConfigContainerContext(container);
  +
  +  return matcher.whenReady;
  +}
  +
  +class ConfigFileContext {
  +  ConfigContainerContext containerContext;
  +
  +  ConfigFileContext(this.containerContext);
  +
  +  List<ConfigSection> sectionsForFilename(String filename) {
  +    return containerContext.configSections.where((ConfigSection section) {
  +      return section.matchesFull("${containerContext.path}/$filename") == Glob.COMPLETE_MATCH;
  +    });
  +  }
  +
  +  String getValue(String propertyName) {
  +    String value;
  +    for (ConfigSection configSection in containerContext.configSections) {
  +      value = configSection.getValue(propertyName);
  +      if (value != null) {
  +        return value;
  +      }
  +    }
  +    return null;
  +  }
  +}
  +
  +class ConfigContainerContext {
     List<ConfigSection> configSections = [];
  -  workspace.File file;
  -  chrome.ChromeFileEntry get fileEntry => file.entry;
  -
  -  ConfigSectionMatcher(this.file);
  -
  -  Future<ConfigFile> getSections() {
  -    return fileEntry.getParent().then((chrome.DirectoryEntry dir) {
  -      return getSectionsForPath(dir);
  -    });
  -  }
  -
  -  Future<ConfigFile> getSectionsForPath(chrome.DirectoryEntry dir) {
  +  workspace.Container container;
  +  chrome.ChromeFileEntry get entry => container.entry;
  +  String get path => entry.fullPath;
  +  Future<ConfigContainerContext> whenReady;
  +
  +  ConfigContainerContext(this.container) {
  +    whenReady = _getSections(container.entry).then((_) => this);
  +  }
  +
  +  Future<ConfigFile> _getSections(chrome.DirectoryEntry dir) {
       int insertIndex = configSections.length;
       return dir.getFile(".editorConfig").then((chrome.ChromeFileEntry configFile) {
         return configFile.readText();
  
positive.code:     glob = new Glob(sectionId);
    }
  
    bool matchesPath(String path) {
      return (glob.matchPath(path) == Glob.COMPLETE_MATCH);
    }
  
    String getValue(String propertyName) {
  
negative.code:   int charSet;
    bool trimWhitespace;
    bool insertFinalNewline;
  
    ConfigFileContext _context;
  
    EditorConfig(ConfigContainerContext containerContext, workspace.File file) {
      _context = new ConfigFileContext(containerContext);
      // indent_style
      useSpaces = _propertyToBool("indent_style", trueValue: "space",
          falseValue: "tab");
  
      // tab_width
      String value = _context.getValue("tab_width");
      if (value == null) {
        _context.getValue("indent_size");
      }
  
      tabWidth = int.parse(value);
      if (tabWidth.toString() != value || tabWidth < 1) {
        throw new EditorConfigException.forProperty("tab_width", value);
      }
  
      // indent_size
      value = _context.getValue("indent_size");
      if (value == "tab") {
        indentSize = tabWidth;
      } else {
        indentSize = int.parse(value);
        if (indentSize.toString() != value || indentSize < 1) {
          throw new EditorConfigException.forProperty("indent_size", value);
        }
      }
  
      // end_of_line
      value = _context.getValue("end_of_line");
      if (value == "cr") {
        lineEnding = ENDING_CR;
      } else if (value == "lf") {
        lineEnding = ENDING_LF;
      } else if (value == "crlf") {
        lineEnding = ENDING_CRLF;
      } else {
        throw new EditorConfigException.forProperty("end_of_line", value);
      }
  
      // charset
      value = _context.getValue("charset");
      if (value == "latin1") {
        charSet = CHARSET_LATIN;
      } else if (value == "utf-8") {
        charSet = CHARSET_UTF8;
      } else if (value == "utf-8-bom") {
        charSet = CHARSET_UTF8BOM;
      } else if (value == "utf-16be") {
        charSet = CHARSET_UTF16BE;
      } else if (value == "utf-16le") {
        charSet = CHARSET_UTF16LE;
      } else {
        throw new EditorConfigException.forProperty("charset", value);
      }
  
      // trim_trailing_whitespace
      trimWhitespace = _propertyToBool("trim_trailing_whitespace");
  
      // insert_final_newline
      insertFinalNewline = _propertyToBool("insert_final_newline");
    }
  
    bool _propertyToBool(String propertyName,
        {String trueValue: "true", String falseValue: "false"}) {
      String value = _context.getValue(propertyName);
  
      if (value == trueValue) {
        return true;
  