// Path: plugins/fr.inria.atlanmod.emftocsp.ui/src/fr/inria/atlanmod/emftocsp/ui/widgets/IElementSelectionWidget.java
// public interface IElementSelectionWidget {
// 	
// 	Object getElementSelected();
// 	
// 	boolean isInSelectionMode();
// 	
// 	boolean isSelectedElementValid();	
// }
// 
// Path: plugins/fr.inria.atlanmod.emftocsp.ui/src/fr/inria/atlanmod/emftocsp/ui/widgets/IElementSelectionWidgetListener.java
// public interface IElementSelectionWidgetListener {
// 	
// 	void elementSelectionWidgetChanged(IElementSelectionWidget widget);
// 
// }


import java.util.Collection;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.DrillDownComposite;
import fr.inria.atlanmod.emftocsp.ui.widgets.IElementSelectionWidget;
import fr.inria.atlanmod.emftocsp.ui.widgets.IElementSelectionWidgetListener;
	class TreeLabelProvider extends AppearanceAwareLabelProvider {

		public void addListener(ILabelProviderListener listener) {
		}

		public void dispose() {
		}

		public boolean isLabelProperty(Object element, String property) {
			return false;
		}

		public void removeListener(ILabelProviderListener listener) {
		}

		public Image getImage(Object element) {
			return super.getImage(element); //Discourage access
		}

		public String getText(Object element) {
		  if (IResource.class.isInstance(element)) 
			return ((IResource)element).getName();
		  return ""; //$NON-NLS-1$
		}
	}
	
	private TreeViewer treeViewer;
	private Button chkDisableSelection = null;
	private IStructuredSelection selection;
	private Collection<String> allowedTypes;
// Path: plugins/fr.inria.atlanmod.emftocsp.ui/src/fr/inria/atlanmod/emftocsp/ui/widgets/IElementSelectionWidget.java
// public interface IElementSelectionWidget {
// 	
// 	Object getElementSelected();
// 	
// 	boolean isInSelectionMode();
// 	
// 	boolean isSelectedElementValid();	
// }
// 
// Path: plugins/fr.inria.atlanmod.emftocsp.ui/src/fr/inria/atlanmod/emftocsp/ui/widgets/IElementSelectionWidgetListener.java
// public interface IElementSelectionWidgetListener {
// 	
// 	void elementSelectionWidgetChanged(IElementSelectionWidget widget);
// 
// }


// Path: plugins/fr.inria.atlanmod.emftocsp.ui/src/fr/inria/atlanmod/emftocsp/ui/widgets/impl/ElementSelectionWidget.java
import java.util.Collection;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.DrillDownComposite;
import fr.inria.atlanmod.emftocsp.ui.widgets.IElementSelectionWidget;
import fr.inria.atlanmod.emftocsp.ui.widgets.IElementSelectionWidgetListener;

	class TreeLabelProvider extends AppearanceAwareLabelProvider {

		public void addListener(ILabelProviderListener listener) {
		}

		public void dispose() {
		}

		public boolean isLabelProperty(Object element, String property) {
			return false;
		}

		public void removeListener(ILabelProviderListener listener) {
		}

		public Image getImage(Object element) {
			return super.getImage(element); //Discourage access
		}

		public String getText(Object element) {
		  if (IResource.class.isInstance(element)) 
			return ((IResource)element).getName();
		  return ""; //$NON-NLS-1$
		}
	}
	
	private TreeViewer treeViewer;
	private Button chkDisableSelection = null;
	private IStructuredSelection selection;
	private Collection<String> allowedTypes;
	private IElementSelectionWidgetListener listener;