// Path: org.eclipse.ec4e/src/main/java/org/eclipse/ec4e/internal/resource/FileResource.java
// public class FileResource implements Resource {
// 	final IFile file;
// 
// 	public FileResource(IFile file) {
// 		super();
// 		this.file = file;
// 	}
// 
// 	@Override
// 	public boolean exists() {
// 		return file.exists();
// 	}
// 
// 	@Override
// 	public ResourcePath getParent() {
// 		IContainer parent = file.getParent();
// 		return parent == null ? null : new ContainerResourcePath(parent);
// 	}
// 
// 	@Override
// 	public Ec4jPath getPath() {
// 		return Ec4jPaths.of(file.getLocation().toString().replaceAll("[\\\\]", "/"));
// 	}
// 
// 	@Override
// 	public RandomReader openRandomReader() throws IOException {
// 		try (Reader reader = openReader()) {
// 			return org.ec4j.core.Resource.Resources.StringRandomReader.ofReader(reader);
// 		}
// 	}
// 
// 	@Override
// 	public Reader openReader() throws IOException {
// 		try {
// 			return new InputStreamReader(file.getContents(), Charset.forName(file.getCharset()));
// 		} catch (CoreException e) {
// 			throw new IOException(e);
// 		}
// 	}
// 
// }


import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import org.ec4j.core.Cache;
import org.ec4j.core.EditorConfigConstants;
import org.ec4j.core.EditorConfigLoader;
import org.ec4j.core.PropertyTypeRegistry;
import org.ec4j.core.Resource;
import org.ec4j.core.ResourceProperties;
import org.ec4j.core.ResourcePropertiesService;
import org.ec4j.core.ide.IdeSupportService;
import org.ec4j.core.model.EditorConfig;
import org.ec4j.core.model.Version;
import org.ec4j.core.parser.ErrorHandler;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ec4e.internal.resource.FileResource;


		@Override
		public void resourceChanged(IResourceChangeEvent event) {
			if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
				IResourceDelta delta = event.getDelta();
				if (delta != null) {
					try {
						delta.accept(this);
					} catch (CoreException e) {
						EditorConfigPlugin.logError("Error while .editorconfig resource changed", e);
					}
				}
			}
		}

		@Override
		public boolean visit(IResourceDelta delta) throws CoreException {
			IResource resource = delta.getResource();
			if (resource == null) {
				return false;
			}
			switch (resource.getType()) {
			case IResource.ROOT:
			case IResource.PROJECT:
			case IResource.FOLDER:
				return true;
			case IResource.FILE:
				IFile file = (IFile) resource;
				if (EditorConfigConstants.EDITORCONFIG.equals(file.getName())
						&& delta.getKind() == IResourceDelta.CHANGED) {

// Path: org.eclipse.ec4e/src/main/java/org/eclipse/ec4e/internal/resource/FileResource.java
// public class FileResource implements Resource {
// 	final IFile file;
// 
// 	public FileResource(IFile file) {
// 		super();
// 		this.file = file;
// 	}
// 
// 	@Override
// 	public boolean exists() {
// 		return file.exists();
// 	}
// 
// 	@Override
// 	public ResourcePath getParent() {
// 		IContainer parent = file.getParent();
// 		return parent == null ? null : new ContainerResourcePath(parent);
// 	}
// 
// 	@Override
// 	public Ec4jPath getPath() {
// 		return Ec4jPaths.of(file.getLocation().toString().replaceAll("[\\\\]", "/"));
// 	}
// 
// 	@Override
// 	public RandomReader openRandomReader() throws IOException {
// 		try (Reader reader = openReader()) {
// 			return org.ec4j.core.Resource.Resources.StringRandomReader.ofReader(reader);
// 		}
// 	}
// 
// 	@Override
// 	public Reader openReader() throws IOException {
// 		try {
// 			return new InputStreamReader(file.getContents(), Charset.forName(file.getCharset()));
// 		} catch (CoreException e) {
// 			throw new IOException(e);
// 		}
// 	}
// 
// }


// Path: org.eclipse.ec4e/src/main/java/org/eclipse/ec4e/IDEEditorConfigManager.java
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import org.ec4j.core.Cache;
import org.ec4j.core.EditorConfigConstants;
import org.ec4j.core.EditorConfigLoader;
import org.ec4j.core.PropertyTypeRegistry;
import org.ec4j.core.Resource;
import org.ec4j.core.ResourceProperties;
import org.ec4j.core.ResourcePropertiesService;
import org.ec4j.core.ide.IdeSupportService;
import org.ec4j.core.model.EditorConfig;
import org.ec4j.core.model.Version;
import org.ec4j.core.parser.ErrorHandler;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ec4e.internal.resource.FileResource;


		@Override
		public void resourceChanged(IResourceChangeEvent event) {
			if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
				IResourceDelta delta = event.getDelta();
				if (delta != null) {
					try {
						delta.accept(this);
					} catch (CoreException e) {
						EditorConfigPlugin.logError("Error while .editorconfig resource changed", e);
					}
				}
			}
		}

		@Override
		public boolean visit(IResourceDelta delta) throws CoreException {
			IResource resource = delta.getResource();
			if (resource == null) {
				return false;
			}
			switch (resource.getType()) {
			case IResource.ROOT:
			case IResource.PROJECT:
			case IResource.FOLDER:
				return true;
			case IResource.FILE:
				IFile file = (IFile) resource;
				if (EditorConfigConstants.EDITORCONFIG.equals(file.getName())
						&& delta.getKind() == IResourceDelta.CHANGED) {

					entries.remove(new FileResource(file));
