// Path: org.eclipse.ec4e/src/main/java/org/eclipse/ec4e/utils/EditorUtils.java
// public class EditorUtils {
// 
// 	public static boolean isEditorConfigFile(ITextEditor textEditor) {
// 		IFile configFile = EditorUtils.getFile(textEditor);
// 		return isEditorConfigFile(configFile);
// 	}
// 
// 	public static boolean isEditorConfigFile(IFile configFile) {
// 		return configFile != null && EditorConfigConstants.EDITORCONFIG.equals(configFile.getName());
// 	}
// 
// 	public static IFile getFile(ITextEditor textEditor) {
// 		IEditorInput input = textEditor.getEditorInput();
// 		if (input instanceof IFileEditorInput) {
// 			return ((IFileEditorInput) input).getFile();
// 		}
// 		return null;
// 	}
// }


import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.ec4e.utils.EditorUtils;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;

package org.eclipse.ec4e.internal.outline;


public class EditorConfigToOutlineAdapterFactory implements IAdapterFactory {

	@Override
	public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
		if (adapterType == IContentOutlinePage.class && adaptableObject instanceof ITextEditor

// Path: org.eclipse.ec4e/src/main/java/org/eclipse/ec4e/utils/EditorUtils.java
// public class EditorUtils {
// 
// 	public static boolean isEditorConfigFile(ITextEditor textEditor) {
// 		IFile configFile = EditorUtils.getFile(textEditor);
// 		return isEditorConfigFile(configFile);
// 	}
// 
// 	public static boolean isEditorConfigFile(IFile configFile) {
// 		return configFile != null && EditorConfigConstants.EDITORCONFIG.equals(configFile.getName());
// 	}
// 
// 	public static IFile getFile(ITextEditor textEditor) {
// 		IEditorInput input = textEditor.getEditorInput();
// 		if (input instanceof IFileEditorInput) {
// 			return ((IFileEditorInput) input).getFile();
// 		}
// 		return null;
// 	}
// }


// Path: org.eclipse.ec4e/src/main/java/org/eclipse/ec4e/internal/outline/EditorConfigToOutlineAdapterFactory.java
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.ec4e.utils.EditorUtils;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;

package org.eclipse.ec4e.internal.outline;


public class EditorConfigToOutlineAdapterFactory implements IAdapterFactory {

	@Override
	public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
		if (adapterType == IContentOutlinePage.class && adaptableObject instanceof ITextEditor

				&& EditorUtils.isEditorConfigFile((ITextEditor) adaptableObject)) {
