// Path: core/fr.opensagres.eclipse.jsbuild.core/src/fr/opensagres/eclipse/jsbuild/core/ITask.java
// public interface ITask extends IJSBuildFileNode {
// 
// 	ITask[] EMPTY_TASK = new ITask[0];
// 
// 	/**
// 	 * Returns true if this task is the default task and false otherwise.
// 	 * 
// 	 * @return true if this task is the default task and false otherwise.
// 	 */
// 	boolean isDefault();
// 
// }
// 
// Path: core/fr.opensagres.eclipse.jsbuild.ui/src/fr/opensagres/eclipse/jsbuild/internal/ui/views/JSBuildFileLabelProvider.java
// public class JSBuildFileLabelProvider extends LabelProvider implements
// 		IStyledLabelProvider, IColorProvider {
// 
// 	@Override
// 	public StyledString getStyledText(Object element) {
// 		if (element instanceof IJSBuildFile) {
// 			IJSBuildFile node = (IJSBuildFile) element;
// 			StyledString buff = new StyledString(node.getLabel());
// 			IFile buildfile = node.getBuildFileResource();
// 			if (buildfile != null) {
// 				buff.append("  "); //$NON-NLS-1$
// 				buff.append('[', StyledString.DECORATIONS_STYLER);
// 				buff.append(buildfile.getFullPath().makeRelative().toString(),
// 						StyledString.DECORATIONS_STYLER);
// 				buff.append(']', StyledString.DECORATIONS_STYLER);
// 			}
// 			return buff;
// 		} else if (element instanceof ITask) {
// 			return new StyledString(((ITask) element).getLabel());
// 		}
// 		return null;
// 	}
// 
// 	@Override
// 	public Color getForeground(Object node) {
// 		if (node instanceof ITask && ((ITask) node).isDefault()) {
// 			return Display.getDefault().getSystemColor(SWT.COLOR_BLUE);
// 		}
// 		return Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
// 	}
// 
// 	@Override
// 	public Color getBackground(Object element) {
// 		return Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
// 	}
// 
// 	@Override
// 	public Image getImage(Object element) {
// 		if (element instanceof IJSBuildFileNode) {
// 			String factoryId = ((IJSBuildFileNode) element).getFactoryId();
// 			ILabelProvider labelProvider = LabelProviderRegistryReader
// 					.getInstance().getLabelProvider(factoryId);
// 			if (labelProvider != null) {
// 				// custom image.
// 				Image image = labelProvider.getImage(element);
// 				if (image != null) {
// 					return image;
// 				}
// 			}
// 		}
// 		return super.getImage(element);
// 	}
// 
// }


import fr.opensagres.eclipse.jsbuild.internal.ui.views.JSBuildFileLabelProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;
import fr.opensagres.eclipse.jsbuild.core.ITask;
/**
 *  Copyright (c) 2013-2014 Angelo ZERR.
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 *  Contributors:
 *  Angelo Zerr <angelo.zerr@gmail.com> - initial API and implementation
 */
package fr.opensagres.eclipse.jsbuild.internal.ui.launchConfigurations;



/**
 * Task label provider for a table
 */
public class TaskTableLabelProvider extends JSBuildFileLabelProvider implements
		ITableLabelProvider {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang
	 * .Object, int)
	 */
	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		if (columnIndex == 0) {
			return getImage(element);
		}
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang
	 * .Object, int)
	 */
	@Override
	public String getColumnText(Object element, int columnIndex) {
		if (columnIndex == 0) {
// Path: core/fr.opensagres.eclipse.jsbuild.core/src/fr/opensagres/eclipse/jsbuild/core/ITask.java
// public interface ITask extends IJSBuildFileNode {
// 
// 	ITask[] EMPTY_TASK = new ITask[0];
// 
// 	/**
// 	 * Returns true if this task is the default task and false otherwise.
// 	 * 
// 	 * @return true if this task is the default task and false otherwise.
// 	 */
// 	boolean isDefault();
// 
// }
// 
// Path: core/fr.opensagres.eclipse.jsbuild.ui/src/fr/opensagres/eclipse/jsbuild/internal/ui/views/JSBuildFileLabelProvider.java
// public class JSBuildFileLabelProvider extends LabelProvider implements
// 		IStyledLabelProvider, IColorProvider {
// 
// 	@Override
// 	public StyledString getStyledText(Object element) {
// 		if (element instanceof IJSBuildFile) {
// 			IJSBuildFile node = (IJSBuildFile) element;
// 			StyledString buff = new StyledString(node.getLabel());
// 			IFile buildfile = node.getBuildFileResource();
// 			if (buildfile != null) {
// 				buff.append("  "); //$NON-NLS-1$
// 				buff.append('[', StyledString.DECORATIONS_STYLER);
// 				buff.append(buildfile.getFullPath().makeRelative().toString(),
// 						StyledString.DECORATIONS_STYLER);
// 				buff.append(']', StyledString.DECORATIONS_STYLER);
// 			}
// 			return buff;
// 		} else if (element instanceof ITask) {
// 			return new StyledString(((ITask) element).getLabel());
// 		}
// 		return null;
// 	}
// 
// 	@Override
// 	public Color getForeground(Object node) {
// 		if (node instanceof ITask && ((ITask) node).isDefault()) {
// 			return Display.getDefault().getSystemColor(SWT.COLOR_BLUE);
// 		}
// 		return Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
// 	}
// 
// 	@Override
// 	public Color getBackground(Object element) {
// 		return Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
// 	}
// 
// 	@Override
// 	public Image getImage(Object element) {
// 		if (element instanceof IJSBuildFileNode) {
// 			String factoryId = ((IJSBuildFileNode) element).getFactoryId();
// 			ILabelProvider labelProvider = LabelProviderRegistryReader
// 					.getInstance().getLabelProvider(factoryId);
// 			if (labelProvider != null) {
// 				// custom image.
// 				Image image = labelProvider.getImage(element);
// 				if (image != null) {
// 					return image;
// 				}
// 			}
// 		}
// 		return super.getImage(element);
// 	}
// 
// }


// Path: core/fr.opensagres.eclipse.jsbuild.ui/src/fr/opensagres/eclipse/jsbuild/internal/ui/launchConfigurations/TaskTableLabelProvider.java
import fr.opensagres.eclipse.jsbuild.internal.ui.views.JSBuildFileLabelProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;
import fr.opensagres.eclipse.jsbuild.core.ITask;

/**
 *  Copyright (c) 2013-2014 Angelo ZERR.
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 *
 *  Contributors:
 *  Angelo Zerr <angelo.zerr@gmail.com> - initial API and implementation
 */
package fr.opensagres.eclipse.jsbuild.internal.ui.launchConfigurations;



/**
 * Task label provider for a table
 */
public class TaskTableLabelProvider extends JSBuildFileLabelProvider implements
		ITableLabelProvider {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang
	 * .Object, int)
	 */
	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		if (columnIndex == 0) {
			return getImage(element);
		}
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang
	 * .Object, int)
	 */
	@Override
	public String getColumnText(Object element, int columnIndex) {
		if (columnIndex == 0) {
			ITask node = (ITask) element;